Use a standard Makefile to load load.lisp and remove the installation part in load...
[clfswm.git] / Makefile
bloba7f333eae3eeffa6204a6b116ad3487dfdc3f6f8
1 DESTDIR=/usr/local/
3 CLISP=$(shell which clisp)
4 SBCL=$(shell which sbcl)
5 CMUCL=$(shell which cmucl || which lisp)
6 CCL=$(shell which ccl)
7 ECL=$(shell which ecl)
8 LOADTMP=load.tmp.lisp
10 SRC=$(wildcard *.lisp src/*.lisp)
12 all: clfswm
14 clfswm: $(SRC)
15 @echo "Please, tweak the file load.lisp to fit your needs."
16 @if test -f "$(CLISP)"; then echo "Building with CLISP"; $(CLISP) -E iso-8859-1 $(LOADTMP); \
17 elif test -f "$(SBCL)"; then echo "Building with SBCL"; $(SBCL) --load $(LOADTMP); \
18 elif test -f "$(CMUCL)"; then echo "Building with CMUCL"; $(CMUCL) -load $(LOADTMP); \
19 elif test -f "$(CCL)"; then echo "Building with CCL"; $(CCL) --load $(LOADTMP); \
20 elif test -f "$(ECL)"; then echo "Building with ECL"; $(ECL) -load $(LOADTMP); \
21 else echo "No Lisp found. Please, install one of CLISP, SBCL, CMUCL, CCL or ECL"; \
26 install: clfswm
27 @echo "Installing CLFSWM in $(DESTDIR)"
28 mkdir -p $(DESTDIR)
29 mkdir -p $(DESTDIR)/bin
30 mkdir -p $(DESTDIR)/lib/clfswm
31 mkdir -p $(DESTDIR)/share/doc/clfswm
32 mkdir -p $(DESTDIR)/man/man.1
33 cp clfswm $(DESTDIR)/bin/
34 cp -R contrib/* $(DESTDIR)/lib/clfswm/
35 cp doc/* $(DESTDIR)/share/doc/clfswm/
36 cp README COPYING AUTHORS $(DESTDIR)/share/doc/clfswm/
37 cp clfswm.1 $(DESTDIR)/man/man.1/
40 uninstall:
41 @echo "Uninstalling CLFSWM from $(DESTDIR)"
42 rm -f $(DESTDIR)/bin/clfswm
43 rm -rf $(DESTDIR)/lib/clfswm/*
44 rm -f $(DESTDIR)/share/doc/clfswm/*
45 rm -f $(DESTDIR)/man/man.1/clfswm.1
46 rmdir $(DESTDIR)/lib/clfswm
47 rmdir $(DESTDIR)/share/doc/clfswm
50 clean:
51 rm -f clfswm