comparison keiko/Makefile @ 0:bfdcc3820b32

Basis
author Mike Spivey <mike@cs.ox.ac.uk>
date Thu, 05 Oct 2017 08:04:15 +0100
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:bfdcc3820b32
1 #
2 # runtime/Makefile. Generated from Makefile.in by configure.
3 #
4 # runtime/Makefile.in
5 #
6 # This file is part of the Oxford Oberon-2 compiler
7 # Copyright (c) 2006 J. M. Spivey
8 # All rights reserved
9 #
10 # Redistribution and use in source and binary forms, with or without
11 # modification, are permitted provided that the following conditions are met:
12 #
13 # 1. Redistributions of source code must retain the above copyright notice,
14 # this list of conditions and the following disclaimer.
15 # 2. Redistributions in binary form must reproduce the above copyright notice,
16 # this list of conditions and the following disclaimer in the documentation
17 # and/or other materials provided with the distribution.
18 # 3. The name of the author may not be used to endorse or promote products
19 # derived from this software without specific prior written permission.
20 #
21 # THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
22 # IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
23 # OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
24 # IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
25 # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
26 # PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
27 # OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
28 # WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
29 # OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
30 # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31 #
32
33 # Config stuff
34 AR = ar
35 RANLIB = ranlib
36 CFLAGS = -g -O2
37 RTFLAGS = $(CFLAGS) -fno-strict-aliasing
38 TCLSH = tclsh
39 GC_PAGESIZE = 4096
40 # End
41
42 include config.mk
43
44 all :: ppx pplink
45
46 ALL_CFLAGS = $(CFLAGS) -Wall $(INCLUDE)
47 ALL_RTFLAGS = $(RTFLAGS) -Wall $(HOST_DEFINES) $(INCLUDE)
48
49 PPLINK = oblink.o linker.o symtab.o template.o util.o
50 pplink : $(PPLINK)
51 $(CC) $(CFLAGS) -o $@ $^
52
53 $(PPLINK) : %.o : %.c
54 $(CC) $(ALL_CFLAGS) -c $< -o $@
55
56 COMMON = support.o loader.o gc0.o dynlink.o
57 PACK = $(AR) cr $@ $^ && $(RANLIB) $@
58
59 ppx: obx-t.a lib.o
60 $(CC) $(ALL_RTFLAGS) $^ -o $@
61
62 obx-t.a : interp-t.o xmain-t.o trace.o $(COMMON); $(PACK)
63
64 # Cancel default rule
65 %.o: %.c
66
67 xmain.o xmain-t.o oblink.o: CFLAGS += -DREVID=\"compilers\"
68
69 interp.o trace.o lib.o $(COMMON): %.o : %.c
70 $(CC) $(ALL_RTFLAGS) -c $< -o $@
71
72 %-t.o : %.c
73 $(CC) $(ALL_RTFLAGS) -DTRACE -c $< -o $@
74
75 GEN = keiko.h template.c interp.c
76
77 generate : $(GEN)
78
79 keiko.h template.c interp.c : iset.tcl keiko.iset iskel.c config.tcl
80 $(TCLSH) iset.tcl keiko.iset keiko.h template.c interp.c
81
82
83 ## Cleanup
84
85 # clean: remove all object files
86 clean:
87 rm -f pplink ppx *.[ao]
88
89 # realclean: remove generated source too
90 realclean: clean
91 rm -f $(GEN)
92
93 .DELETE_ON_ERROR:
94
95 ###
96
97 support.o interp.o interp-t.o interp-p.o interp-d.o profile.o \
98 xmain.o xmain-t.o xmain-p.o xmain-d.o xmain-j.o debug.o \
99 trace.o loader.o jit.o jitlab.o gc0.o: \
100 obx.h obcommon.h config.h exec.h
101
102 interp.o interp-t.o xmain.o xmain-t.o trace.o: \
103 keiko.h
104
105 linker.o oblink.o symtab.o template.o util.o: \
106 oblink.h obcommon.h config.h exec.h util.h keiko.h