@@@ work in progress
[runlisp] / Makefile.am
CommitLineData
e29834b8
MW
1### -*-makefile-*-
2###
3### Build script for `runlisp'
4###
5### (c) 2020 Mark Wooding
6###
7
8###----- Licensing notice ---------------------------------------------------
9###
10### This file is part of Runlisp, a tool for invoking Common Lisp scripts.
11###
12### Runlisp is free software: you can redistribute it and/or modify it
13### under the terms of the GNU General Public License as published by the
14### Free Software Foundation; either version 3 of the License, or (at your
15### option) any later version.
16###
17### Runlisp is distributed in the hope that it will be useful, but WITHOUT
18### ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
19### FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
20### for more details.
21###
22### You should have received a copy of the GNU General Public License
23### along with Runlisp. If not, see <https://www.gnu.org/licenses/>.
24
25include $(top_srcdir)/vars.am
26
27SUBDIRS =
28
29pkgdata_DATA =
30image_DATA =
31image_SCRIPTS =
32
33SUBDIRS += .
34
35ACLOCAL_AMFLAGS = -Im4
36
37###--------------------------------------------------------------------------
38### The main driver program.
39
40bin_PROGRAMS += runlisp
41runlisp_SOURCES = runlisp.c
7b8ff279
MW
42runlisp_SOURCES += common.c common.h
43runlisp_SOURCES += lib.c lib.h
44runlisp_SOURCES += mdwopt.c mdwopt.h
e29834b8
MW
45man_MANS += runlisp.1
46
7b8ff279
MW
47noinst_PROGRAMS += old-runlisp
48old_runlisp_SOURCES = old-runlisp.c
49old_runlisp_SOURCES += lib.c lib.h
50
51noinst_PROGRAMS += toy
52toy_SOURCES = toy.c
53toy_SOURCES += lib.c lib.h
54
e29834b8
MW
55###--------------------------------------------------------------------------
56### Additional machinery.
57
58pkgdata_DATA += eval.lisp
59EXTRA_DIST += eval.lisp
60
61###--------------------------------------------------------------------------
62### Image dumping.
63
7b8ff279
MW
64bin_PROGRAMS += dump-runlisp-image
65dump_runlisp_image_SOURCES = dump-runlisp-image.c
66dump_runlisp_image_SOURCES += common.c common.h
67dump_runlisp_image_SOURCES += lib.c lib.h
68dump_runlisp_image_SOURCES += mdwopt.c mdwopt.h
e29834b8
MW
69man_MANS += dump-runlisp-image.1
70
7b8ff279
MW
71DUMP_RUNLISP_IMAGE = $(v_dump)./dump-runlisp-image \
72 -f -c$(srcdir)/runlisp.conf -O$@
73
e29834b8
MW
74v_dump = $(v_dump_@AM_V@)
75v_dump_ = $(v_dump_@AM_DEFAULT_V@)
76v_dump_0 = @echo " DUMP $@";
77
e29834b8
MW
78if DUMP_SBCL
79image_DATA += sbcl+asdf.core
80CLEANFILES += sbcl+asdf.core
7b8ff279
MW
81sbcl+asdf.core: dump-runlisp-image runlisp.conf
82 $(DUMP_RUNLISP_IMAGE) sbcl
e29834b8
MW
83endif
84
85if DUMP_CCL
86image_DATA += ccl+asdf.image
87CLEANFILES += ccl+asdf.image
7b8ff279
MW
88ccl+asdf.image: dump-runlisp-image runlisp.conf
89 $(DUMP_RUNLISP_IMAGE) ccl
e29834b8
MW
90endif
91
92if DUMP_CLISP
93image_DATA += clisp+asdf.mem
94CLEANFILES += clisp+asdf.mem
7b8ff279
MW
95clisp+asdf.mem: dump-runlisp-image runlisp.conf
96 $(DUMP_RUNLISP_IMAGE) clisp
e29834b8
MW
97endif
98
99if DUMP_ECL
100image_SCRIPTS += ecl+asdf
101CLEANFILES += ecl+asdf
7b8ff279
MW
102ecl+asdf: dump-runlisp-image runlisp.conf
103 $(DUMP_RUNLISP_IMAGE) -odata-dir=$(srcdir) ecl
e29834b8
MW
104endif
105
106if DUMP_CMUCL
107image_DATA += cmucl+asdf.core
108CLEANFILES += cmucl+asdf.core
7b8ff279
MW
109cmucl+asdf.core: dump-runlisp-image runlisp.conf
110 $(DUMP_RUNLISP_IMAGE) cmucl
e29834b8
MW
111endif
112
113###--------------------------------------------------------------------------
114### Benchmarking and testing.
115
116if BENCHMARK
117SUBDIRS += bench
118endif
119
120SUBDIRS += t
121
122###--------------------------------------------------------------------------
123### Distribution.
124
125## Release number.
126dist-hook::
127 echo $(VERSION) >$(distdir)/RELEASE
128
129## Additional build tools.
130EXTRA_DIST += config/auto-version
131
132###----- That's all, folks --------------------------------------------------