Initial revision
[ssr] / StraySrc / Libraries / BAS / src / Makefile,fe1
1 #
2 # Makefile
3 #
4 # © 1998 Straylight/Edgeware
5 #
6
7 #----- Licensing note -------------------------------------------------------
8 #
9 # This makefile is free software; you can redistribute it and/or modify
10 # it under the terms of the GNU General Public License as published by
11 # the Free Software Foundation; either version 2, or (at your option)
12 # any later version.
13 #
14 # This makefile is distributed in the hope that it will be useful,
15 # but WITHOUT ANY WARRANTY; without even the implied warranty of
16 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 # GNU General Public License for more details.
18 #
19 # You should have received a copy of the GNU General Public License
20 # along with this makefile. If not, write to the Free Software Foundation,
21 # 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
22
23 #----- Compilation flags ----------------------------------------------------
24
25 # --- Uncomment to use the C4 tools ---
26
27 # OLD = o-
28
29 # --- C compilation ---
30
31 CC = $(OLD)cc -c -o $@
32 CFLAGS = -depend !Depend -throwback -ffah -Ilibs: -IC:
33 COMPILE = $(CC) $(CFLAGS)
34
35 # --- Assembling ---
36
37 AS = $(OLD)objasm -quit -to $@
38 ASFLAGS = -stamp -depend !Depend -throwback
39 ASSEMBLE = $(AS) $(ASFLAGS) -from
40
41 BAS = basasm
42
43 # --- Linking ---
44
45 LD = $(OLD)link -o $@
46 LD_APP = $(LD) -aif
47 LD_UTIL = $(LD) -bin -base 0
48 LD_MOD = $(LD) -bin -base 0
49 LD_BIN = $(LD) -bin -base 0
50 LD_DLL = $(LD) -rmf
51 LD_AOF = $(LD) -aof
52
53 # --- Making libraries ---
54
55 AR = $(OLD)libfile -o
56
57 CDLL = cdll
58
59 # --- Setting file types ---
60
61 SET_APP = SetType $@ FF8
62 SET_MOD = SetType $@ FFA
63 SET_UTIL = SetType $@ FFC
64 SET_DLL = SetType $@ FFD
65
66 # --- Other maintenance things ---
67
68 RM = ssrclean
69 INSTALL = inst
70 SETDATE = setdate
71 SQUEEZE = squeeze $@
72 DATE = %zdy %mo %ce%yr
73 MODDATE = %dy %m3 %ce%yr
74 CRIGHT = © %ce%yr Straylight
75 FIXLINK = fixlink $@
76
77 #----- Default rules --------------------------------------------------------
78
79 .SUFFIXES: .o .c .s .bs
80 .c.o:
81 $(COMPILE) $<
82 .s.o:
83 $(ASSEMBLE) $<
84 .bs.o:
85 $(BAS) $< $@
86
87 #----- Object files ---------------------------------------------------------
88
89 # --- Object files for the code section ---
90
91 OBJS = \
92 o.bas \
93 o.aofGen o.basTalk o.get o.insert o.lit o.vars \
94 o.fastMove o.flex o.string \
95 o.messages
96
97 SCRIPTS = \
98 scripts.crunchit \
99 scripts.execit \
100 scripts.nonsqueeze \
101 scripts.preproc
102
103 #----- Compiling things -----------------------------------------------------
104
105 all: bas
106
107 bas: bc.bas bascode
108 copy bc.bas bas ~c~v~nf~r
109 print bascode { >> bas }
110
111 bascode: $(OBJS)
112 $(LD_BIN) $(OBJS)
113
114 o.messages: rsc.messages
115 msgaof rsc.messages o.messages sh.messages
116
117 bc.bas: b.bas scripts.crunchit
118 @echo *** Crunching Basic library ***
119 obey scripts.crunchit
120 @$(RM) work.*
121
122 install: bas scripts.exports
123 $(INSTALL) bas scripts.exports <SSR$LibDir>.BAS
124
125 clean:
126 -$(RM) o.* bc.* work.* bas bascode
127
128 #----- Dynamic dependencies -------------------------------------------------
129
130 # Dynamic dependencies:
131 o.insert: s.insert
132 o.insert: libs:header
133 o.insert: libs:swis
134 o.insert: libs:stream
135 o.insert: sh.bas
136 o.insert: sh.workspace
137 o.insert: libs:sh.flexws
138 o.vars: s.vars
139 o.vars: libs:header
140 o.vars: libs:swis
141 o.vars: libs:stream
142 o.vars: sh.bas
143 o.vars: sh.basTalk
144 o.fastMove: s.fastMove
145 o.fastMove: libs:s.fastMove
146 o.fastMove: libs:header
147 o.fastMove: libs:swis
148 o.string: s.string
149 o.string: libs:swis
150 o.string: libs:header
151 o.string: sh.workspace
152 o.string: libs:sh.flexws
153 o.basTalk: s.basTalk
154 o.basTalk: libs:header
155 o.basTalk: libs:swis
156 o.basTalk: libs:stream
157 o.basTalk: sh.basicEnv
158 o.basTalk: sh.messages
159 o.basTalk: sh.string
160 o.basTalk: sh.workspace
161 o.basTalk: libs:sh.flexws
162 o.bas: s.bas
163 o.bas: libs:header
164 o.bas: libs:swis
165 o.bas: libs:stream
166 o.bas: sh.aofGen
167 o.bas: sh.basicEnv
168 o.bas: sh.basTalk
169 o.bas: sh.fastMove
170 o.bas: libs:sh.fastMove
171 o.bas: sh.flex
172 o.bas: libs:sh.flex
173 o.bas: sh.get
174 o.bas: sh.insert
175 o.bas: sh.lit
176 o.bas: sh.messages
177 o.bas: sh.string
178 o.bas: sh.vars
179 o.bas: sh.workspace
180 o.bas: libs:sh.flexws
181 o.aofGen: s.aofGen
182 o.aofGen: libs:header
183 o.aofGen: libs:swis
184 o.aofGen: libs:stream
185 o.aofGen: sh.bas
186 o.aofGen: sh.basTalk
187 o.aofGen: sh.flex
188 o.aofGen: libs:sh.flex
189 o.aofGen: sh.insert
190 o.aofGen: sh.lit
191 o.aofGen: sh.messages
192 o.aofGen: sh.string
193 o.aofGen: sh.workspace
194 o.aofGen: libs:sh.flexws
195 o.get: s.get
196 o.get: libs:header
197 o.get: libs:swis
198 o.get: libs:stream
199 o.get: sh.aofGen
200 o.get: sh.bas
201 o.get: sh.basTalk
202 o.get: sh.flex
203 o.get: libs:sh.flex
204 o.get: sh.string
205 o.get: sh.workspace
206 o.get: libs:sh.flexws
207 o.lit: s.lit
208 o.lit: libs:header
209 o.lit: libs:swis
210 o.lit: libs:stream
211 o.lit: sh.aofGen
212 o.lit: sh.bas
213 o.lit: sh.fastMove
214 o.lit: libs:sh.fastMove
215 o.lit: sh.flex
216 o.lit: libs:sh.flex
217 o.lit: sh.insert
218 o.lit: sh.workspace
219 o.lit: libs:sh.flexws
220 o.flex: s.flex
221 o.flex: libs:header
222 o.flex: sh.workspace
223 o.flex: libs:sh.flexws
224 o.flex: libs:s.flex
225 o.flex: libs:header
226 o.flex: libs:swis
227 o.flex: s.flex
228 o.flex: libs:header
229 o.flex: sh.workspace
230 o.flex: libs:sh.flexws
231 o.flex: libs:s.flex
232 o.flex: libs:header
233 o.flex: libs:swis
234 o.flex: s.flex
235 o.flex: libs:header
236 o.flex: sh.workspace
237 o.flex: libs:sh.flexws
238 o.flex: libs:s.flex
239 o.flex: libs:header
240 o.flex: libs:swis
241 o.flex: s.flex
242 o.flex: libs:header
243 o.flex: sh.workspace
244 o.flex: libs:sh.flexws
245 o.flex: libs:s.flex
246 o.flex: libs:header
247 o.flex: libs:swis