(0 . 0)(1 . 98)
2195 # Makefile for TinyScheme
2196 # Time-stamp: <2002-06-24 14:13:27 gildea>
2197
2198 # Windows/2000
2199 #CC = cl -nologo
2200 #DEBUG= -W3 -Z7 -MD
2201 #DL_FLAGS=
2202 #SYS_LIBS=
2203 #Osuf=obj
2204 #SOsuf=dll
2205 #LIBsuf=.lib
2206 #EXE_EXT=.exe
2207 #LD = link -nologo
2208 #LDFLAGS = -debug -map -dll -incremental:no
2209 #LIBPREFIX =
2210 #OUT = -out:$@
2211 #RM= -del
2212 #AR= echo
2213
2214 # Unix, generally
2215 CC = gcc -fpic -pedantic
2216 DEBUG=-g -Wall -Wno-char-subscripts -O
2217 Osuf=o
2218 SOsuf=so
2219 LIBsuf=a
2220 EXE_EXT=
2221 LIBPREFIX=lib
2222 OUT = -o $@
2223 RM= -rm -f
2224 AR= ar crs
2225
2226 # Linux
2227 LD = gcc
2228 LDFLAGS = -shared
2229 DEBUG=-g -Wno-char-subscripts -O
2230 SYS_LIBS= -ldl -lm
2231 PLATFORM_FEATURES= -DSUN_DL=1
2232
2233 # Cygwin
2234 #PLATFORM_FEATURES = -DUSE_STRLWR=0
2235
2236 # MinGW/MSYS
2237 #SOsuf=dll
2238 #PLATFORM_FEATURES = -DUSE_STRLWR=0
2239
2240 # Mac OS X
2241 #LD = gcc
2242 #LDFLAGS = --dynamiclib
2243 #DEBUG=-g -Wno-char-subscripts -O
2244 #SYS_LIBS= -ldl
2245 #PLATFORM_FEATURES= -DUSE_STRLWR=1 -D__APPLE__=1 -DOSX=1
2246
2247
2248 # Solaris
2249 #SYS_LIBS= -ldl -lc
2250 #Osuf=o
2251 #SOsuf=so
2252 #EXE_EXT=
2253 #LD = ld
2254 #LDFLAGS = -G -Bsymbolic -z text
2255 #LIBPREFIX = lib
2256 #OUT = -o $@
2257
2258 FEATURES = $(PLATFORM_FEATURES) -DUSE_DL=1 -DUSE_MATH=1 -DUSE_ASCII_NAMES=0
2259
2260 OBJS = scheme.$(Osuf) dynload.$(Osuf)
2261
2262 LIBTARGET = $(LIBPREFIX)tinyscheme.$(SOsuf)
2263 STATICLIBTARGET = $(LIBPREFIX)tinyscheme.$(LIBsuf)
2264
2265 all: $(LIBTARGET) $(STATICLIBTARGET) scheme$(EXE_EXT)
2266
2267 %.$(Osuf): %.c
2268 $(CC) -I. -c $(DEBUG) $(FEATURES) $(DL_FLAGS) $<
2269
2270 $(LIBTARGET): $(OBJS)
2271 $(LD) $(LDFLAGS) $(OUT) $(OBJS) $(SYS_LIBS)
2272
2273 scheme$(EXE_EXT): $(OBJS)
2274 $(CC) -o $@ $(DEBUG) $(OBJS) $(SYS_LIBS)
2275
2276 $(STATICLIBTARGET): $(OBJS)
2277 $(AR) $@ $(OBJS)
2278
2279 $(OBJS): scheme.h scheme-private.h opdefines.h
2280 dynload.$(Osuf): dynload.h
2281
2282 clean:
2283 $(RM) $(OBJS) $(LIBTARGET) $(STATICLIBTARGET) scheme$(EXE_EXT)
2284 $(RM) tinyscheme.ilk tinyscheme.map tinyscheme.pdb tinyscheme.exp
2285 $(RM) scheme.ilk scheme.map scheme.pdb scheme.lib scheme.exp
2286 $(RM) *~
2287
2288 TAGS_SRCS = scheme.h scheme.c dynload.h dynload.c
2289
2290 tags: TAGS
2291 TAGS: $(TAGS_SRCS)
2292 etags $(TAGS_SRCS)