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 if ./test ./$${lang}-fringe 2>&3; then \
32 win=$$(expr $$win + 1); \
35 lose=$$(expr $$lose + 1); \
39 if [ $$lose -eq 0 ]; then \
40 echo "All $$win test(s) OK"; \
42 echo "FAILED $$lose test(s)!"; \
46 ###--------------------------------------------------------------------------
50 CFLAGS = -O2 -g -pedantic -Wall
53 .c.o:; $(CC) -c $(CFLAGS) -o $@ $<
59 ###--------------------------------------------------------------------------
63 HFLAGS = -O2 -XFlexibleInstances
64 CLEANFILES += *.hi *.hc
66 .hs.o:; $(HC) -c $(HFLAGS) -o $@ $<
69 haskell-fringe: haskell-fringe.o
72 ###--------------------------------------------------------------------------
79 icon-fringe: icon-fringe.icn
82 ###--------------------------------------------------------------------------
86 cl-fringe: cl-fringe.lisp
87 cl-launch -R -o $@ -f `pwd`/$^
89 ###--------------------------------------------------------------------------
95 .fs.exe:; fsc -o $@ $<
98 f\#-fringe: f\#-fringe.exe
102 ###--------------------------------------------------------------------------
108 .scm.o:; $(SCMC) $(SCMFLAGS) -o $@ $<
111 scheme-fringe: scheme-fringe.o
114 ###--------------------------------------------------------------------------
118 TARGETS += smalltalk-fringe.im
119 smalltalk-fringe.im: smalltalk-fringe.st
120 echo "ObjectMemory snapshot: '$@.new'" | gst $^ -
123 { echo '#! /bin/sh'; \
124 echo '"exec" "gst" "-I" "$@.im" "-f" "$$0" "$$@"'; \
125 echo 'ObjectMemory quit: (Node main: Smalltalk arguments)'; \
130 ###----- That's all, folks --------------------------------------------------