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
67
68
|
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
67
68
69
|
+
+
-
+
-
+
-
-
-
-
-
-
+
+
+
+
+
+
-
|
SOFILES = $(MODULEFILES:%.scm=%.so)
CFILES = $(MODULEFILES:%.scm=%.c)
OFILES = $(MODULEFILES:%.scm=%.o)
TARGFILES = $(notdir $(SOFILES))
MODULES = $(addprefix $(TARGDIR)/modules/,$(TARGFILES))
install : $(TARGDIR)/stmlrun $(LOGDIR) $(MODULES)
all : $(SOFILES)
stmlrun : stmlrun.scm formdat.scm misc-stml.scm session.scm stml.scm \
setup.scm html-filter.scm requirements.scm keystore.scm \
sugar.scm
cookie.scm
csc stmlrun.scm
$(TARGDIR)/stmlrun : stmlrun
cp stmlrun $(TARGDIR)
chmod a+rx $(TARGDIR)/stmlrun
$(TARGDIR)/modules :
mkdir -p $(TARGDIR)/modules
$(MODULES) : $(SOFILES) $(TARGDIR)/modules
cp $< $@
# logging currently relies on this
#
$(LOGDIR) :
mkdir -p $(LOGDIR)
chmod a+rwx $(LOGDIR)
test: kiatoa.db
test: kiatoa.db cookie.so
echo '(exit)'| csi -q ./tests/test.scm
# modules
#
%.so : %.scm
csc -I modules/* -s $<
all : $(SOFILES)
dbi.so : dbi.scm
csc -i dbi.scm
installdbi : dbi.so
# Cookie is a special case for now. Make a loadable so for test
# Complile it in by include (see dependencies above).
cookie.so : cookie.scm
csc -s cookie.scm
cp dbi.so /usr/local/lib/chicken/3/
#
# $(CFILES): build/%.c: ../scm/%.scm ../scm/macros.scm
# chicken $< -output-file $@
#
#
# $(OFILES): src/%.o: src/%.c
# gcc -c $< `chicken-config -cflags` -o $@
#
# $(src_code): %: src/%.o src/laedlib.o src/layobj.o
# gcc src/$*.o src/laedlib.o src/layobj.o -o $* `chicken-config -libs`
#
|