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 ###--------------------------------------------------------------------------
88 cl-fringe: cl-fringe.lisp
89 cl-launch -R -o $@ -f `pwd`/$^
91 ###--------------------------------------------------------------------------
97 .fs.exe:; fsc -o $@ $<
100 f\#-fringe: f\#-fringe.exe
104 ###--------------------------------------------------------------------------
110 .scm.o:; $(SCMC) $(SCMFLAGS) -o $@ $<
113 scheme-fringe: scheme-fringe.o
116 ###--------------------------------------------------------------------------
120 TARGETS += smalltalk-fringe.im
121 smalltalk-fringe.im: smalltalk-fringe.st
122 echo "ObjectMemory snapshot: '$@.new'" | gst $^ -
125 { echo '#! /bin/sh'; \
126 echo '"exec" "gst" "-I" "$@.im" "-f" "$$0" "$$@"'; \
127 echo 'ObjectMemory quit: (Node main: Smalltalk arguments)'; \
132 ###----- That's all, folks --------------------------------------------------