### -*- Fundamental -*-
###
-### $Id: makefile,v 1.12 1995/10/15 00:42:29 cph Exp $
+### $Id: makefile,v 1.13 1995/11/04 00:58:42 cph Exp $
###
### Copyright (c) 1994-95 Massachusetts Institute of Technology
###
all: scheme.exe bchschem.exe bintopsb.exe psbtobin.exe
+# Uncomment exactly one of the following two lines:
+debug_mode = debug
+#debug_mode = optimize
+
# Uncomment exactly one of the following include statements to
# customize this makefile for your compiler. All of the
# configurations require both GNU make and GNU m4.
### -*- Fundamental -*-
###
-### $Id: makefile.cmn,v 1.5 1995/10/30 08:08:12 cph Exp $
+### $Id: makefile.cmn,v 1.6 1995/11/04 00:58:50 cph Exp $
###
### Copyright (c) 1994-95 Massachusetts Institute of Technology
###
-del *.$(OBJ)
-del *.exe
-del *.tch
+ -del *.res
-del *.err
-del *.sym
-del cmpauxmd.$(ASM)
os2fs.$(OBJ) : osfs.h
os2pm.$(OBJ) : os2pm-id.h os2pm-mi.h os2pm-dc.h os2pm-rp.h
os2pmcon.$(OBJ) : os2pmcon.h version.h
-os2pmcon.res : os2pmcon.rc os2pmcon.h
os2proc.$(OBJ) : osproc.h
os2top.$(OBJ) : scheme.tch ostop.h option.h
os2tty.$(OBJ) : ostty.h
pros2fs.$(OBJ) : scheme.tch prims.h osfs.h
pros2io.$(OBJ) : scheme.tch prims.h
pros2pm.$(OBJ) : scheme.tch prims.h
+
+scheme.res : os2pmcon.rc os2pmcon.h
+ rc -r -DSCHEME os2pmcon.rc scheme.res
+
+bchschem.res : os2pmcon.rc os2pmcon.h
+ rc -r -DBCHSCHEM os2pmcon.rc bchschem.res
### -*- Fundamental -*-
###
-### $Id: makefile.emx,v 1.5 1995/10/30 08:08:32 cph Exp $
+### $Id: makefile.emx,v 1.6 1995/11/04 00:59:46 cph Exp $
###
### Copyright (c) 1994-95 Massachusetts Institute of Technology
###
# macro preprocessor, and the RC program included with the IBM OS/2
# Toolkit.
+GCCFLAGS := -Zmt -O
+ifeq ($(debug_mode),debug)
+GCCFLAGS := $(GCCFLAGS) -g
+endif
+
OBJ = o
ASM = s
CC = gcc
-GCCFLAGS = -Zmt -O -g
CFLAGS = $(GCCFLAGS) -DMIT_SCHEME -D__OS2__
LDFLAGS = $(GCCFLAGS)
M4 = m4
%.o : %.s
$(AS) $(ASFLAGS) -o $@ $<
-%.res : %.rc
- rc -r $<
-
%.exe :
$(CC) $(LDFLAGS) -o $(basename $@) $^
emxbind -bq $(basename $@)
include os2utl\makefile.cmn
-scheme.exe : $(OBJECTS) $(SCHEME_OBJECTS) os2pmcon.res
+scheme.exe : $(OBJECTS) $(SCHEME_OBJECTS) scheme.res
$(CC) $(LDFLAGS) -o $(basename $@) \
$(OBJECTS) $(SCHEME_OBJECTS) $(SCHEME_LIB)
- emxbind -bpq $(basename $@) -ros2pmcon.res
+ emxbind -bpq $(basename $@) -rscheme.res
del $(basename $@)
-bchschem.exe : $(BCHOBJECTS) $(SCHEME_OBJECTS)
+bchschem.exe : $(BCHOBJECTS) $(SCHEME_OBJECTS) bchschem.res
$(CC) $(LDFLAGS) -o $(basename $@) \
$(OBJECTS) $(SCHEME_OBJECTS) $(SCHEME_LIB)
- emxbind -bpq $(basename $@) -ros2pmcon.res
+ emxbind -bpq $(basename $@) -rbchschem.res
del $(basename $@)
### -*- Fundamental -*-
###
-### $Id: makefile.gcc,v 1.4 1995/10/17 23:06:21 cph Exp $
+### $Id: makefile.gcc,v 1.5 1995/11/04 00:59:53 cph Exp $
###
### Copyright (c) 1995 Massachusetts Institute of Technology
###
# development system (compiler, assembler, linker, etc.), and the GNU
# m4 macro preprocessor.
+GCCFLAGS := -O
+ifeq ($(debug_mode),debug)
+GCCFLAGS := $(GCCFLAGS) -g
+endif
+
OBJ = obj
ASM = asm
CC = gcc -Uunix -U__unix__ -U__unix -D__GCC2__
-GCCFLAGS = -O -g
CFLAGS = $(GCCFLAGS) -DMIT_SCHEME
LDFLAGS = $(GCCFLAGS)
M4 = m4
include os2utl\makefile.cmn
-scheme.exe : $(OBJECTS) $(SCHEME_OBJECTS)
+scheme.exe : $(OBJECTS) $(SCHEME_OBJECTS) scheme.res
$(CC) $(LDFLAGS) -o $@ $^ $(SCHEME_LIB)
+ rc scheme.res $@
-bchschem.exe : $(BCHOBJECTS) $(SCHEME_OBJECTS)
+bchschem.exe : $(BCHOBJECTS) $(SCHEME_OBJECTS) bchschem.res
$(CC) $(LDFLAGS) -o $@ $^ $(SCHEME_LIB)
+ rc bchschem.res $@
### -*- Fundamental -*-
###
-### $Id: makefile.vac,v 1.4 1995/10/30 08:09:24 cph Exp $
+### $Id: makefile.vac,v 1.5 1995/11/04 00:58:57 cph Exp $
###
### Copyright (c) 1994-95 Massachusetts Institute of Technology
###
# included with the EMX/GCC package, and the RC program included with
# the IBM OS/2 Toolkit.
-# For optimization, replace /Ti+ with /O+.
-# For OS/2 2.x, replace /B"/EXEPACK:2" with /B"/EXEPACK"
+ICCFLAGS := /Gm+ /Q+ /Wall-
+ifeq ($(debug_mode),debug)
+ICCFLAGS := $(ICCFLAGS) /Ti+
+else
+ifeq ($(debug_mode),optimize)
+ICCFLAGS := $(ICCFLAGS) /O+
+endif
+endif
OBJ = obj
ASM = asm
CC = icc
-ICCFLAGS = /Gm+ /Q+ /Wall- /Ti+
CFLAGS = $(ICCFLAGS) /DMIT_SCHEME
-LDFLAGS = $(ICCFLAGS) /B"/EXEPACK:2"
-SCHEME_LDFLAGS = $(LDFLAGS)
+LDFLAGS = $(ICCFLAGS) /B"/EXEPACK"
M4 = m4
M4FLAGS = -DOS2
AS = as
%.obj : %.asm
$(AS) $(ASFLAGS) -o $@ $<
-%.res : %.rc
- rc -r $<
-
%.exe :
$(CC) $(LDFLAGS) /Fe$@ $^
include os2utl\makefile.cmn
-scheme.exe : $(OBJECTS) $(SCHEME_OBJECTS) os2pmcon.res
- $(CC) $(SCHEME_LDFLAGS) /B"/PMTYPE:PM" /Fe$@ \
+scheme.exe : $(OBJECTS) $(SCHEME_OBJECTS) scheme.res
+ $(CC) $(LDFLAGS) /B"/PMTYPE:PM" /Fe$@ \
$(OBJECTS) $(SCHEME_OBJECTS) $(SCHEME_LIB)
- rc os2pmcon.res $@
+ rc scheme.res $@
-bchschem.exe : $(BCHOBJECTS) $(SCHEME_OBJECTS) os2pmcon.res
- $(CC) $(SCHEME_LDFLAGS) /B"/PMTYPE:PM" /Fe$@ \
+bchschem.exe : $(BCHOBJECTS) $(SCHEME_OBJECTS) bchschem.res
+ $(CC) $(LDFLAGS) /B"/PMTYPE:PM" /Fe$@ \
$(OBJECTS) $(SCHEME_OBJECTS) $(SCHEME_LIB)
- rc os2pmcon.res $@
+ rc bchschem.res $@
### -*- Fundamental -*-
###
-### $Id: makefile.wcc,v 1.5 1995/10/30 08:09:51 cph Exp $
+### $Id: makefile.wcc,v 1.6 1995/11/04 00:59:37 cph Exp $
###
### Copyright (c) 1994-95 Massachusetts Institute of Technology
###
# /mf use flat memory model (default)
# /od disable optimization (default with /d2)
# /oe enable in-line user-code expansion [OPTIMIZE]
-# /op force IEEE floating-point semantics
# /ox enable various optimizations [OPTIMIZE]
# /s remove stack overflow checks
# /sg generate calls to grow stack
# /ze enable language extensions (default)
# /zp4 use 4-byte alignment
# /zq operate quietly
-CFLAGS = /4r /bm /d2 /fpi /fp3 /op /s /sg /w0 /zc /zp4 /zq /dMIT_SCHEME
+CFLAGS := /4r /bm /fpi /fp3 /s /sg /w0 /zc /zp4 /zq /dMIT_SCHEME
+
+ifeq ($(debug_mode),debug)
+CFLAGS := $(CFLAGS) /d2
+else
+ifeq ($(debug_mode),optimize)
+CFLAGS := $(CFLAGS) /d1+ /oe /ox
+endif
+endif
# Linker options.
#
# option caseexact use case-sensitive comparison for identifiers
# option quiet operate quietly
# option symfile put debug info in .sym file
-LDFLAGS = debug all option caseexact option quiet
+LDFLAGS := debug all option caseexact option quiet option symfile
# M4 options.
#
# /fp3 generate in-line 387 insns
# /mf use flat memory model
# /zq operate quietly
-ASFLAGS = /d1 /fpi /fp3 /mf /zq
+ASFLAGS := /fpi /fp3 /mf /zq
+ifeq ($(debug_mode),debug)
+ASFLAGS := $(ASFLAGS) /d1
+endif
\f
%.obj : %.c
$(CC) $(CFLAGS) $<
%.obj : %.asm
$(AS) $(ASFLAGS) /fo=$@ $<
-%.res : %.rc
- rc -r $<
-
%.exe :
wlink system os2v2 $(LDFLAGS) name $@ file { $^ }
cmpauxmd.asm : cmpauxmd.m4 asmcvt.exe
.\asmcvt pre < $< | $(M4) $(M4FLAGS) | .\asmcvt post > $@
-scheme.exe : $(OBJECTS) $(SCHEME_OBJECTS) os2pmcon.res
+scheme.exe : $(OBJECTS) $(SCHEME_OBJECTS) scheme.res
wlink system os2v2_pm name $@ $(LDFLAGS) \
file { $(OBJECTS) $(SCHEME_OBJECTS) } $(SCHEME_LIB)
- rc os2pmcon.res $@
+ rc scheme.res $@
-bchschem.exe : $(BCHOBJECTS) $(SCHEME_OBJECTS) os2pmcon.res
+bchschem.exe : $(BCHOBJECTS) $(SCHEME_OBJECTS) bchschem.res
wlink system os2v2_pm name $@ $(LDFLAGS) \
file { $(OBJECTS) $(SCHEME_OBJECTS) } $(SCHEME_LIB)
- rc os2pmcon.res $@
+ rc bchschem.res $@