Commit | Line | Data |
---|---|---|
c8f068d2 MW |
1 | ### -*-makefile-*- |
2 | ### | |
3 | ### $Id$ | |
4 | ### | |
5 | ### Makefile for runlisp | |
6 | ### | |
7 | ### (c) 2006 Straylight/Edgeware | |
8 | ### | |
9 | ||
10 | ###----- Licensing notice --------------------------------------------------- | |
11 | ### | |
12 | ### This program is free software; you can redistribute it and/or modify | |
13 | ### it under the terms of the GNU General Public License as published by | |
14 | ### the Free Software Foundation; either version 2 of the License, or | |
15 | ### (at your option) any later version. | |
16 | ### | |
17 | ### This program is distributed in the hope that it will be useful, | |
18 | ### but WITHOUT ANY WARRANTY; without even the implied warranty of | |
19 | ### MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
20 | ### GNU General Public License for more details. | |
21 | ### | |
22 | ### You should have received a copy of the GNU General Public License | |
23 | ### along with this program; if not, write to the Free Software Foundation, | |
24 | ### Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. | |
25 | ||
26 | prefix = /usr/local | |
27 | bindir = /usr/local/bin | |
28 | libdir = /usr/local/lib/runlisp | |
29 | ||
30 | CC = gcc | |
31 | CFLAGS = -O2 -g -Wall -pedantic | |
32 | LDFLAGS = | |
33 | ||
34 | all: \ | |
35 | runlisp-cmucl runlisp-cmucl.core \ | |
36 | runlisp-ecl \ | |
37 | runlisp-clisp runlisp-clisp.mem | |
38 | ||
39 | runlisp-cmucl: runlisp-cmucl.o | |
40 | $(CC) $(LDFLAGS) -o $@ $^ | |
41 | ||
42 | runlisp-cmucl.o: runlisp-helper.c | |
43 | $(CC) -c -o $@ \ | |
44 | -DCMUCL \ | |
45 | -DLISP=\"/usr/bin/cmucl\" \ | |
46 | -DCORE=\"$(libdir)/runlisp-cmucl.core\" \ | |
47 | $< | |
48 | ||
49 | runlisp-clisp.o: runlisp-helper.c | |
50 | $(CC) -c -o $@ \ | |
51 | -DCLISP \ | |
52 | -DLISP=\"/usr/lib/clisp/full/lisp.run\" \ | |
53 | -DCORE=\"$(libdir)/runlisp-clisp.mem\" \ | |
54 | $< | |
55 | ||
56 | build-cmucl.stamp: build.lisp runlisp.lisp | |
57 | cmucl -noinit -load "$<" | |
58 | ||
59 | build-ecl.stamp: build.lisp runlisp.lisp | |
60 | ecl -load "$<" | |
61 | ||
62 | build-clisp.stamp: build.lisp runlisp.lisp | |
63 | clisp "$<" | |
64 | ||
65 | runlisp-cmucl.core: make-runlisp.lisp build-cmucl.stamp | |
66 | cmucl -noinit -load "$<" | |
67 | ||
68 | runlisp-ecl: make-runlisp.lisp runlisp.lisp build-ecl.stamp | |
69 | ecl -load "$<" | |
70 | ||
71 | runlisp-clisp.mem: make-runlisp.lisp runlisp.lisp build-clisp.stamp | |
72 | clisp "$<" | |
73 | ||
74 | install: all | |
75 | install -d $(DISTDIR)$(bindir) | |
76 | install -d $(DISTDIR)$(libdir) | |
77 | install -m644 \ | |
78 | runlisp-clisp.mem runlisp-cmucl.core \ | |
79 | $(DISTDIR)$(libdir) | |
80 | install -m755 \ | |
81 | runlisp-cmucl runlisp-ecl runlisp-clisp \ | |
82 | $(DISTDIR)$(bindir) | |
83 | ||
84 | clean: | |
85 | rm -f *.stamp \ | |
86 | runlisp-ecl runlisp-cmucl runlisp-clisp \ | |
87 | *.x86f *.fas *.lib *.o \ | |
88 | *.core *.mem | |
89 | ||
90 | ###----- That's all, folks -------------------------------------------------- |