summaryrefslogtreecommitdiffstats
path: root/Makefile
blob: c60caae1644e3832dc51ae01f701bba6729bd5f4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
CFLAGS = $(CPPFLAGS)

#
# Set up namespace for clink.mk
#

CLK = CFOO_

#
# Set up input variables for clink.mk
#

CFOO_SOURCE_LS := full
CFOO_TARGET_DIR := new/
CFOO_MODULES := binding
CFOO_OBJECTS := call-out.o
CFOO_PRELOAD := call-in
CFOO_LOAD := main

#
# all target should be the first one so make with no arguments
# does "make all"
#

.PHONY all:

all:

#
# bring in the magic!
#

include clink.mk

#
# a clean target which includes the output variable produces by
# clink.mk, which expands to all of the targets and intermediate
# files produced by the rules therein.
#

clean:
        $(RM) $(CFOO_CLEAN) call-out.o

#
# Phony target all depends on the Lisp executable and memory
# image, forcing them to be updated.
#

all: new/$(CFOO_LISPRUN) new/lispinit.mem

#
# Compiling the extra object files is outside of the responsibility
# of clink.mk, but clink.mk does take care of Lisp -> FAS compiling
# of all of the files mentioned in $(CLK)MODULES, $(CLK)PRELOAD and 
# $(CLK)LOAD.
#

call-out.o: call-out.c
        $(CC) $(CFLAGS) -c -o $@ $<

#
# A kind of test: after all the rules are read, if we switch the
# namespace, it should not screw up any of the rule bodies.
#

CLK = BAR_