Debian Codegraph @

terps/tads/tads2/beos/makefile

raw symbols SCIP
1 #
2 # Makefile for BeOS-based TADS 2
3 # Ported by Christopher Tate, <[email protected]>
4 #
5 # Compile TADS2 for BeOS from within the 'beos' subdirectory
6 # of the main TADS2 tree.
7
8 #
9 # Places to look for include files.
10 #
11 INCLUDES = -I. -I..
12
13 #
14 # Current patchlevel of BeOS sources. Note that this is a *string*.
15 #
16 BEOSPATCHLEVEL= -DBEOSPATCHLEVEL=\"1\"
17
18 #
19 # Name of the BeOS port maintainers
20 # Add your name here if you do a new BeOS port.
21 #
22 CTATE=Christopher Tate <[email protected]>
23
24 #
25 # BeOS x86
26 #
27 ifdef COMPILE_FOR_DEBUG
28 OPTIMIZE=-g -O0
29 else
30 OPTIMIZE=-O3
31 endif
32
33 CC=gcc
34 BEOSFLAGS=-Wall -W -Wno-multichar -Wno-unused -DOSANSI
35 SYSFLAGS= -DSYSPL=\"1\" -DPORTER=\""$(CTATE)"\" -DSYSMAINTAINER=\""BeOS port maintained by $(CTATE)\n"\"
36 CFLAGS= $(BEOSFLAGS) $(SYSFLAGS)
37 LIBS=-lbe
38 CP=copyattr --data
39 MAKEXEC=mimeset -f
40
41 #
42 # compilation rules
43 #
44 %.o : %.cpp
45 $(CC) -c $< $(OPTIMIZE) $(BEOSPATCHLEVEL) $(CFLAGS) $(INCLUDES) -o $@
46
47 # look in the main TADS2 directory for source files first
48 %.o : ../%.c
49 $(CC) -c $< $(OPTIMIZE) $(BEOSPATCHLEVEL) $(CFLAGS) $(INCLUDES) -o $@
50
51 # compile out of this directory only if it isn't in the main TADS2 directory
52 %.o : %.c
53 $(CC) -c $< $(OPTIMIZE) $(BEOSPATCHLEVEL) $(CFLAGS) $(INCLUDES) -o $@
54
55 #
56 # Various groups of object files to be linked together in various combinations
57 #
58
59 # objects in common to all executables
60 COMMONOBJS= ler.o mcm.o mcs.o mch.o \
61 obj.o cmd.o errmsg.o dummy.o fioxor.o os0.o argize.o \
62 oserr.o cmap.o regex.o osifc.o osbeos.o
63
64 # common run objects for everything with a run-time
65 CMNRUNOBJS_NOHTML = $(COMMONOBJS) \
66 dat.o lst.o out.o voc.o bif.o suprun.o run.o
67
68 # common objects for all executables incorporating a run-time and no HTML
69 CMNRUNOBJS= $(CMNRUNOBJS_NOHTML) output.o
70
71 # common objects for run-times with HTML
72 CMNRUNOBJS_HTML = $(CMNRUNOBJS_NOHTML)
73
74 # extra objects beyond the common ones required for the runtime executable
75 RUNOBJS_EXTRA= \
76 vocab.o execmd.o runstat.o ply.o trd.o linfdum.o fio.o \
77 getstr.o qas.o dbgtr.o askf_os.o
78
79 # objects for the run-time system executable with no HTML
80 RUNOBJS= $(CMNRUNOBJS) $(RUNOBJS_EXTRA) osbeos_nohtml.o
81
82 # objects for an HTML run-time executable
83 RUNOBJS_HTML= $(CMNRUNOBJS_HTML) $(RUNOBJS_EXTRA) run.o
84
85 # extra objects for character-mode run-time
86 CHAROBJS= \
87 osnoui.o os0tr_beos.o bifgdum.o indlg_tx.o
88
89 # objects for compiler (includes run-time system)
90 COMPOBJS= $(CMNRUNOBJS) \
91 askf_tx.o bifgdum.o dbg.o emt.o fio.o fiowrt.o \
92 getstr.o indlg_tx.o linf.o objcomp.o prs.o prscomp.o \
93 sup.o tcd.o tok.o tokth.o voccomp.o \
94 osnoui.o os0tc_beos.o osbeos_nohtml.o osbeos.o
95
96 TCOBJS= $(COMPOBJS) tcgdum.o
97
98 # extra objects for all builds of the debugger
99 DBG_EXTRA = \
100 vocab.o execmd.o runstat.o \
101 ply.o fio.o sup.o \
102 linf.o prs.o emt.o \
103 tok.o tdd.o os0td_beos.o \
104 dbg.o dbgrun.o \
105 objcomp.o tokth.o \
106 voccomp.o getstr.o \
107 qas.o run.o \
108 askf_os.o
109
110 # objects for the standard debugger
111 DBGOBJS= $(CMNRUNOBJS) $(DBG_EXTRA) \
112 osnoui.o bifgdum.o osr.o \
113 osgenr.o dbgu.o \
114 indlg_tx.o
115
116 # objects for the html debugger
117 DBGOBJS_HTML = $(CMNRUNOBJS_HTML) $(DBG_EXTRA)
118
119 # extra objects for BeOS HTML libraries
120 WIN32_HTML_LIB_EXTRA = \
121 bifgdum.o osnoui.o
122
123 # identifying strings
124 TR_OEM_OBJ = oem_beos.o
125
126 #
127 # Targets
128 #
129
130 all: tadsr tadsc tadsr.stripped tadsc.stripped trh.a tdbh.a #tdb
131
132 # TADS runtime library for BeOS HTML
133 trh.a: $(RUNOBJS_HTML) $(WIN32_HTML_LIB_EXTRA)
134 ar -rc $@ $^
135
136 # TADS debugger library for BeOS HTML
137 tdbh.a: $(DBGOBJS_HTML) $(WIN32_HTML_LIB_EXTRA)
138 ar -rc $@ $^
139
140 # the TADS compiler - tadsc
141 tadsc: $(TCOBJS)
142 $(CC) -o $@ $(CFLAGS) $^ $(LIBS)
143 $(MAKEXEC) $@
144
145 tadsc.stripped: tadsc
146 $(CP) $< $@
147 strip $@
148
149 # The TADS runtime interpreter - tadsr
150 tadsr: $(RUNOBJS) $(CHAROBJS) $(TR_OEM_OBJ)
151 $(CC) -o $@ $(CFLAGS) $^ $(LIBS)
152 $(MAKEXEC) $@
153
154 tadsr.stripped: tadsr
155 $(CP) $< $@
156 strip $@
157
158 # The TADS debugger - tdb
159 # There's no debugger support for BeOS yet. Be patient.
160 tdb: $(DBGOBJS) $(TR_OEM_OBJ)
161 $(CC) -o $@ $(CFLAGS) $^ $(LIBS)
162 $(MAKEXEC) $@
163
164 tdb.stripped: tdb
165 $(CP) $< $@
166 strip $@
167
168 tadsr.static: $(RUNOBJS) $(CHAROBJS) $(TR_OEM_OBJ)
169 $(CC) -o $@ $(CFLAGS) $^ -static $(LIBS)
170 $(MAKEXEC) $@
171
172 tadsc.static: $(TCOBJS)
173 $(CC) -o $@ $(CFLAGS) $^ -static $(LIBS)
174 $(MAKEXEC) $@
175
176 tdb.static: $(DBGOBJS) $(TR_OEM_OBJ)
177 $(CC) -o $@ $(CFLAGS) $^ -static $(LIBS)
178 $(MAKEXEC) $@
179
180 #
181 # Clean up.
182 #
183 # In addition to removing .o's and binaries, this
184 # also removes files copied from the general source directory.
185 #
186 clean:
187 rm -f *.o
188 rm -f tadsc tadsr tdb trh.a tdbh.a
189 rm -f tadsc.static tadsr.static
190 rm -f tadsc.stripped tadsr.stripped tdb.stripped