1 ### Makefile for same-fringe implementations.
3 ###--------------------------------------------------------------------------
4 ### Notes about organization.
6 ### Most projects have lots of stuff in just a few languages, so it makes
7 ### sense to put the language configuration in one place. This one's
8 ### different. Its entire purpose is to demonstrate lots of different
11 ### So, at the top we declare the main targets; then each language has its
12 ### configuration and build rules.
16 TARGETS = $(patsubst %,%-fringe,$(LANGS))
17 CLEANFILES = $(TARGETS)
20 clean::; rm -f $(CLEANFILES)
22 ###--------------------------------------------------------------------------
28 for lang in $(LANGS); do \
29 echo >&3 "*** $$lang"; \
30 printf "Test $$lang..."; \
31 time=`command time -o/dev/stdout -f "%U user; %S system; %E" \
32 ./test ./$${lang}-fringe 2>&3`; \
33 if [ $$? -eq 0 ]; then \
34 win=$$(expr $$win + 1); \
35 printf " ok ($$time)\n"; \
37 lose=$$(expr $$lose + 1); \
41 if [ $$lose -eq 0 ]; then \
42 echo "All $$win test(s) OK"; \
44 echo "FAILED $$lose test(s)!"; \
48 ###--------------------------------------------------------------------------
52 CFLAGS = -O2 -g -pedantic -Wall
55 .c.o:; $(CC) -c $(CFLAGS) -o $@ $<
61 ###--------------------------------------------------------------------------
65 HFLAGS = -O2 -XFlexibleInstances
66 CLEANFILES += *.hi *.hc
68 .hs.o:; $(HC) -c $(HFLAGS) -o $@ $<
71 haskell-fringe: haskell-fringe.o
74 ###--------------------------------------------------------------------------
81 icon-fringe: icon-fringe.icn
84 ###--------------------------------------------------------------------------
90 cl-fringe: cl-fringe.lisp
91 ## cl-launch -R -o $@ -f `pwd`/$^ -- slow to start
92 cl-launch -o $@ -f `pwd`/$^ +I -r launch -d $@.core
94 ###--------------------------------------------------------------------------
100 .fs.exe:; fsc -o $@ $<
103 f\#-fringe: f\#-fringe.exe
107 ###--------------------------------------------------------------------------
113 .scm.o:; $(SCMC) $(SCMFLAGS) -o $@ $<
116 scheme-fringe: scheme-fringe.o
119 ###--------------------------------------------------------------------------
123 TARGETS += smalltalk-fringe.im
124 smalltalk-fringe.im: smalltalk-fringe.st
125 echo "ObjectMemory snapshot: '$@.new'" | gst $^ -
128 { echo '#! /bin/sh'; \
129 echo '"exec" "gst" "-I" "$@.im" "-f" "$$0" "$$@"'; \
130 echo 'ObjectMemory quit: (Node main: Smalltalk arguments)'; \
135 ###----- That's all, folks --------------------------------------------------