82f588eaee079cbac3ba308799bf4013a0cac346
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.
17 TARGETS
= $(patsubst %,%-fringe
,$(LANGS
))
18 CLEANFILES
= $(TARGETS
)
21 clean::; rm -f
$(CLEANFILES
)
23 ###--------------------------------------------------------------------------
29 for lang in
$(LANGS
); do \
30 echo
>&3 "*** $$lang"; \
31 printf
"Test $$lang..."; \
32 time
=`command time -o/dev/stdout -f "%U user; %S system; %E" \
33 ./test ./$${lang}-fringe 2>&3`; \
34 if
[ $$?
-eq
0 ]; then \
35 win
=$$(expr
$$win + 1); \
36 printf
" ok ($$time)\n"; \
38 lose
=$$(expr
$$lose + 1); \
42 if
[ $$lose -eq
0 ]; then \
43 echo
"All $$win test(s) OK"; \
45 echo
"FAILED $$lose test(s)!"; \
49 ###--------------------------------------------------------------------------
53 wc
-l
$(SOURCES
) |
sort -n
55 ###--------------------------------------------------------------------------
59 CFLAGS
= -O2
-g
-pedantic
-Wall
62 .c.o
:; $(CC
) -c
$(CFLAGS
) -o
$@
$<
69 ###--------------------------------------------------------------------------
73 HFLAGS
= -O2
-XFlexibleInstances
74 CLEANFILES
+= *.hi
*.hc
76 .hs.o
:; $(HC
) -c
$(HFLAGS
) -o
$@
$<
79 SOURCES
+= haskell-fringe.hs
80 haskell-fringe
: haskell-fringe.o
83 ###--------------------------------------------------------------------------
90 SOURCES
+= icon-fringe.icn
91 icon-fringe
: icon-fringe.icn
94 ###--------------------------------------------------------------------------
100 SOURCES
+= cl-fringe.lisp
101 cl-fringe
: cl-fringe.lisp
102 ## cl-launch -R -o $@ -f `pwd`/$^ -- slow to start
103 cl-launch
-o
$@
-f
`pwd`/$^
+I
-r launch
-d
$@.core
105 ###--------------------------------------------------------------------------
111 .fs.exe
:; fsc
-o
$@
$<
114 SOURCES
+= f\
#-fringe.fs
115 f\
#-fringe: f\#-fringe.exe
119 ###--------------------------------------------------------------------------
125 .scm.o
:; $(SCMC
) $(SCMFLAGS
) -o
$@
$<
128 SOURCES
+= scheme-fringe.scm
129 scheme-fringe
: scheme-fringe.o
132 ###--------------------------------------------------------------------------
136 TARGETS
+= smalltalk-fringe.im
137 SOURCES
+= smalltalk-fringe.st
138 smalltalk-fringe.im
: smalltalk-fringe.st
139 echo
"ObjectMemory snapshot: '$@.new'" | gst
$^
-
142 { echo
'#! /bin/sh'; \
143 echo
'"exec" "gst" "-I" "$@.im" "-f" "$$0" "$$@"'; \
144 echo
'ObjectMemory quit: (Node main: Smalltalk arguments)'; \
149 ###----- That's all, folks --------------------------------------------------