Make install *.desktop files
[clfswm.git] / Makefile
blob58e778ac519f23dd270e67acd654ac66c2367132
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 LOAD=load.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 $(LOAD); \
17 elif test -f "$(SBCL)"; then echo "Building with SBCL"; $(SBCL) --load $(LOAD); \
18 elif test -f "$(CMUCL)"; then echo "Building with CMUCL"; $(CMUCL) -load $(LOAD); \
19 elif test -f "$(CCL)"; then echo "Building with CCL"; $(CCL) --load $(LOAD); \
20 elif test -f "$(ECL)"; then echo "Building with ECL"; $(ECL) -load $(LOAD); \
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 mkdir -p $(DESTDIR)/share/applications
34 mkdir -p $(DESTDIR)/share/xsessions
35 cp clfswm $(DESTDIR)/bin/
36 cp -R contrib/* $(DESTDIR)/lib/clfswm/
37 cp doc/* $(DESTDIR)/share/doc/clfswm/
38 cp README COPYING AUTHORS $(DESTDIR)/share/doc/clfswm/
39 cp clfswm.1 $(DESTDIR)/man/man.1/
40 cp clfswm.desktop $(DESTDIR)/share/applications/
41 cp clfswm-session.desktop $(DESTDIR)/share/xsessions/
44 uninstall:
45 @echo "Uninstalling CLFSWM from $(DESTDIR)"
46 rm -f $(DESTDIR)/bin/clfswm
47 rm -rf $(DESTDIR)/lib/clfswm/*
48 rm -f $(DESTDIR)/share/doc/clfswm/*
49 rm -f $(DESTDIR)/man/man.1/clfswm.1
50 rm -f $(DESTDIR)/share/applications/clfswm.desktop
51 rm -f $(DESTDIR)/share/xsessions/clfswm-session.desktop
52 rmdir $(DESTDIR)/lib/clfswm
53 rmdir $(DESTDIR)/share/doc/clfswm
56 clean:
57 rm -f clfswm