(1 . 98)(0 . 0)
171 # Makefile for TinyScheme
172 # Time-stamp: <2002-06-24 14:13:27 gildea>
173
174 # Windows/2000
175 #CC = cl -nologo
176 #DEBUG= -W3 -Z7 -MD
177 #DL_FLAGS=
178 #SYS_LIBS=
179 #Osuf=obj
180 #SOsuf=dll
181 #LIBsuf=.lib
182 #EXE_EXT=.exe
183 #LD = link -nologo
184 #LDFLAGS = -debug -map -dll -incremental:no
185 #LIBPREFIX =
186 #OUT = -out:$@
187 #RM= -del
188 #AR= echo
189
190 # Unix, generally
191 CC = gcc -fpic -pedantic
192 DEBUG=-g -Wall -Wno-char-subscripts -O
193 Osuf=o
194 SOsuf=so
195 LIBsuf=a
196 EXE_EXT=
197 LIBPREFIX=lib
198 OUT = -o $@
199 RM= -rm -f
200 AR= ar crs
201
202 # Linux
203 LD = gcc
204 LDFLAGS = -shared
205 DEBUG=-g -Wno-char-subscripts -O
206 SYS_LIBS= -ldl -lm
207 PLATFORM_FEATURES= -DSUN_DL=1
208
209 # Cygwin
210 #PLATFORM_FEATURES = -DUSE_STRLWR=0
211
212 # MinGW/MSYS
213 #SOsuf=dll
214 #PLATFORM_FEATURES = -DUSE_STRLWR=0
215
216 # Mac OS X
217 #LD = gcc
218 #LDFLAGS = --dynamiclib
219 #DEBUG=-g -Wno-char-subscripts -O
220 #SYS_LIBS= -ldl
221 #PLATFORM_FEATURES= -DUSE_STRLWR=1 -D__APPLE__=1 -DOSX=1
222
223
224 # Solaris
225 #SYS_LIBS= -ldl -lc
226 #Osuf=o
227 #SOsuf=so
228 #EXE_EXT=
229 #LD = ld
230 #LDFLAGS = -G -Bsymbolic -z text
231 #LIBPREFIX = lib
232 #OUT = -o $@
233
234 FEATURES = $(PLATFORM_FEATURES) -DUSE_DL=1 -DUSE_MATH=1 -DUSE_ASCII_NAMES=0
235
236 OBJS = scheme.$(Osuf) dynload.$(Osuf)
237
238 LIBTARGET = $(LIBPREFIX)tinyscheme.$(SOsuf)
239 STATICLIBTARGET = $(LIBPREFIX)tinyscheme.$(LIBsuf)
240
241 all: $(LIBTARGET) $(STATICLIBTARGET) scheme$(EXE_EXT)
242
243 %.$(Osuf): %.c
244 $(CC) -I. -c $(DEBUG) $(FEATURES) $(DL_FLAGS) $<
245
246 $(LIBTARGET): $(OBJS)
247 $(LD) $(LDFLAGS) $(OUT) $(OBJS) $(SYS_LIBS)
248
249 scheme$(EXE_EXT): $(OBJS)
250 $(CC) -o $@ $(DEBUG) $(OBJS) $(SYS_LIBS)
251
252 $(STATICLIBTARGET): $(OBJS)
253 $(AR) $@ $(OBJS)
254
255 $(OBJS): scheme.h scheme-private.h opdefines.h
256 dynload.$(Osuf): dynload.h
257
258 clean:
259 $(RM) $(OBJS) $(LIBTARGET) $(STATICLIBTARGET) scheme$(EXE_EXT)
260 $(RM) tinyscheme.ilk tinyscheme.map tinyscheme.pdb tinyscheme.exp
261 $(RM) scheme.ilk scheme.map scheme.pdb scheme.lib scheme.exp
262 $(RM) *~
263
264 TAGS_SRCS = scheme.h scheme.c dynload.h dynload.c
265
266 tags: TAGS
267 TAGS: $(TAGS_SRCS)
268 etags $(TAGS_SRCS)