source: project/chicken/tags/0.1071/examples/makefile @ 17995

Last change on this file since 17995 was 17995, checked in by felix winkelmann, 10 years ago

imported historic version of chicken (0.1071)

File size: 1.6 KB
Line 
1### makefile for Chicken examples - felix
2
3
4SC = chicken
5SFLAGS = -optimize-level 2 -quiet
6X11LIBPATH = -L/usr/X11R6/lib -L/usr/X11/lib
7CFLAGS = $(X11LIBPATH) `chicken-config -cflags`
8CC = gcc
9SRCDIR = $(CHICKEN_HOME)/src
10
11
12.PHONY : testit all
13
14
15%.o : %.scm
16        $(SC) $< $(SFLAGS) -output-file $*.c
17        $(CC) $*.c $(CFLAGS) -c -o $@
18
19
20all : mandelbrot ctclsh chicken-prolog schelog-support.o mmcp
21
22
23mandelbrot : mandelbrot.o x11cplot.o
24        $(CC) $^ $(CFLAGS) -o $@ `chicken-config -unsafe -libs` -lX11
25
26mmcp : mmcp.o
27        $(CC) $< $(CFLAGS) -o $@ `chicken-config -unsafe -libs -extra-libs` 
28
29ctclsh : ctclsh.o tclAppInit.o
30        $(CC) $^ $(CFLAGS) -o $@ `chicken-config -unsafe -emb-libs -extra-libs` -ltcl
31
32chicken-prolog : chicken-prolog.o prolog.o batch-driver.o support.o compiler.o optimizer.o c-platform.o c-backend.o
33        $(CC) -o $@ $^ $(CFLAGS) `chicken-config -unsafe -libs -extra-libs`
34
35chicken-prolog.o : $(SRCDIR)/chicken.scm $(SRCDIR)/build.scm
36        $(SC) $< -quiet -output-file chicken-prolog.c -postlude "(declare (uses prolog))" -include-path $(SRCDIR)
37        $(CC) -c chicken-prolog.c $(CFLAGS) -o $@
38
39batch-driver.o : $(SRCDIR)/batch-driver.c
40        $(CC) -c $< `chicken-config -cflags` -o $@
41support.o : $(SRCDIR)/support.c
42        $(CC) -c $< `chicken-config -cflags` -o $@
43compiler.o : $(SRCDIR)/compiler.c
44        $(CC) -DC_DEFAULT_TARGET_STACK_SIZE=12000 -c $< `chicken-config -cflags` -o $@
45optimizer.o : $(SRCDIR)/optimizer.c
46        $(CC) -DC_DEFAULT_TARGET_STACK_SIZE=12000 -c $< `chicken-config -cflags` -o $@
47c-platform.o : $(SRCDIR)/c-platform.c
48        $(CC) -c $< `chicken-config -cflags` -o $@
49c-backend.o : $(SRCDIR)/c-backend.c
50        $(CC) -c $< `chicken-config -cflags` -o $@
Note: See TracBrowser for help on using the repository browser.