Debian Codegraph @

terps/tads/tads2/atari/MAKEFILE

raw
1 #
2 # Makefile for Atari TADS
3 #
4 # This makefile is based on the generic Unix makefile.
5 #
6 # NOTE: This hasn't been tested in quite some time, so you will probably
7 # have to make some changes to get everything working.
8 #
9 # NOTE: You must have a version of Make that supports the VPATH variable
10 # to use this makefile. If you don't have one, get GNU Make from
11 # <ftp://ftp.gnu.ai.mit.edu/pub/gnu>.
12 #
13
14 #
15 # The directory the system-independent source files are in,
16 # relative to this directory.
17 #
18 SRCDIR=..
19
20 #
21 # The directory the Unix-specific sources are in, relative to SRCDIR.
22 #
23 ATARISRCDIR=.
24
25 #
26 # We get some files from the Unix directory
27 #
28 UNIXSRCDIR=../unix
29
30 #
31 # Set VPATH so that Make looks in the right places for source files.
32 #
33 VPATH=$(ATARISRCDIR):$(UNIXSRCDIR):$(SRCDIR)
34
35 #
36 # Places to look for include files.
37 #
38 INCLUDES=-I$(ATARISRCDIR) -I$(UNIXSRCDIR) -I$(SRCDIR)
39
40 #
41 # Current patchlevel of Unix sources. This applies to all
42 # machines. Use -DSYSPATCHLEVEL=\"<string>\" for single-machine
43 # patches.
44 #
45 # Note that this is a *string*.
46 #
47 UNIXPATCHLEVEL= -DUNIXPATCHLEVEL=\"1\"
48
49 #
50 # Names of various maintiners
51 #
52 DAVE="Dave Baggett <[email protected]>"
53
54 #
55 # Atari ST (TOS) running GCC 2.3.1
56 #
57 # Caveats:
58 #
59 # - Will not work with GCC 2.4.4
60 #
61 # NOTES:
62 #
63 # To get this to run Unnkulia Zero on a 512K ST, you have to
64 # compile with full optimization and disable SCROLLBACK mode.
65 # Also have to change stacksize to 32000 with fixstk.
66 #
67 # Had to add a prototype to osgen.c for the case when USE_SCROLLBACK
68 # is not defined.
69 #
70 CC=gcc
71 OPTIMIZE=-O2
72 UNIXFLAGS=-v -g -DOSANSI -DUNIX -DATARI # Need -DUNIX to get some things
73 SYSFLAGS= -DOS_SYSTEM_NAME=\""ATARI_ST"\" -DOS_SYSTEM_LDESC=\""Atari ST/TT/Falcon running TOS"\" -DSYSPL=\"1\" -DSYSMAINTAINER=\"$(DAVE)\"
74 CFLAGS= $(UNIXFLAGS) $(SYSFLAGS) -DATARI -mshort -DUSE_SCROLLBACK
75 AFLAGS=
76 OVLFLG=
77 MACHDEP=osatari.o
78 LIBS=-lgem16
79
80
81 # library object files
82 LIBOBJS= ler.o
83
84 # objects in common to all executables
85 UNIXOBJS=
86
87 COMMONOBJS= $(LIBOBJS) $(UNIXOBJS) mcm.o mcs.o mch.o obj.o cmd.o \
88 errmsg.o dummy.o fioxor.o os0.o oserr.o runstat.o \
89 fio.o getstr.o
90
91 CMNRUNOBJS= $(COMMONOBJS) \
92 dat.o lst.o run.o out.o voc.o bif.o \
93 output.o suprun.o
94
95 # objects for run-time
96 RUNOBJS= vocab.o execmd.o ply.o qas.o
97
98 TCAPOBJS= tputs.o tparm.o $(MACHDEP)
99
100 # extra objects for character-mode run-time
101 CHAROBJS= os0tr_un.o bifgdum.o osgen.o osr.o osgenr.o
102
103 # objects for compiler (includes run-time objects)
104 COMPOBJS= linf.o prs.o prscomp.o emt.o sup.o fiowrt.o tok.o
105 objcomp.o osgen.o tokth.o dbg.o voccomp.o bifgdum.o
106
107 TCOBJS= $(CMNRUNOBJS) $(COMPOBJS) tcgdum.o $(TCAPOBJS) os0tc_un.o tcd.o
108
109 TPOBJS= $(CMNRUNOBJS) \
110 linf.o linm.o prs.o emt.o sup.o tok.o fio.o \
111 objcomp.o getstr.o $(MACHDEP) osgen.o tokth.o \
112 dbg.o voccomp.o bifgdum.o qas.o tpd.o vocab.o \
113 execmd.o dbgrun.o runstat.o ply.o
114
115 TCGOBJS= $(COMPOBJS) tcg.o
116
117 TROBJS= $(CMNRUNOBJS) $(RUNOBJS) linfdum.o $(CHAROBJS) $(TCAPOBJS) trd.o dbgtr.o
118
119 # objects for debugger
120 DBGOBJS= $(CMNRUNOBJS) $(COMPOBJS) $(RUNOBJS) tdd.o dbgu.o dbgrun.o
121
122 TDBOBJS= $(DBGOBJS) $(TCAPOBJS) os0td_un.o
123
124 all: tadsr tadsc
125
126 #
127 # ATARI needs the following due to command line length limitations.
128 #
129 tadsr: $(TROBJS)
130 rm -f libtr.olb
131 gcc-ar q libtr.olb ler.o mcm.o mcs.o mch.o obj.o cmd.o errmsg.o dummy.o
132 gcc-ar q libtr.olb fioxor.o os0.o oserr.o dat.o lst.o run.o out.o voc.o
133 gcc-ar q libtr.olb bif.o output.o suprun.o vocab.o execmd.o runstat.o ply.o
134 gcc-ar q libtr.olb trd.o linfdum.o fio.o getstr.o qas.o dbgtr.o bifgdum.o
135 gcc-ar q libtr.olb osgen.o osatari.o
136 gcc-ar s libtr.olb
137 $(CC) $(CFLAGS) os0tr_st.c libtr.olb -o tr.ttp $(LIBS)
138
139 tadsc: $(TCOBJS)
140 rm -f libtc.olb
141 gcc-ar q libtc.olb ler.o mcm.o mcs.o mch.o obj.o cmd.o errmsg.o dummy.o
142 gcc-ar q libtc.olb fioxor.o os0.o oserr.o dat.o lst.o run.o out.o voc.o bif.o
143 gcc-ar q libtc.olb output.o suprun.o linf.o prs.o prscomp.o emt.o sup.o
144 gcc-ar q libtc.olb fiowrt.o tok.o tcd.o fio.o objcomp.o
145 gcc-ar q libtc.olb getstr.o osgen.o tokth.o dbg.o voccomp.o
146 gcc-ar q libtc.olb bifgdum.o runstat.o tcgdum.o osatari.o
147 gcc-ar s libtc.olb
148 $(CC) $(CFLAGS) os0tc_st.c libtc.olb -o tc.ttp $(LIBS)
149
150 # Debugger has never been tested with Atari, but
151 # would probably work fine.
152 tdb:
153 echo "You need to write a build rule tdb."
154
155 clean:
156 rm -f *.o
157 rm -f tadsc tadsr tdb
158
159 .c.o:
160 $(CC) -c $(OPTIMIZE) $(UNIXPATCHLEVEL) $(CFLAGS) $(INCLUDES) $<
161
162 #
163 # prscomp.c gets hosed by the GCC optimizer, so we build it
164 # without optimization.
165 #
166 prscomp.o: prscomp.c
167 $(CC) -c $(CFLAGS) $(UNIXPATCHLEVEL) $(INCLUDES) $<