2017-01-10 10:50:26 +00:00
|
|
|
#
|
|
|
|
# Intel 386(tm)/486(tm) C Code Builder(tm) Kit, Version 1.0
|
|
|
|
#
|
|
|
|
|
2017-02-03 06:28:12 +00:00
|
|
|
# /zmod486 - 80486 instructions
|
|
|
|
# /zfloatsync - FPU is operand-synchronized with the CPU
|
|
|
|
# /m create map file
|
2017-02-04 05:30:15 +00:00
|
|
|
# /g produce debug info
|
2018-12-01 05:22:53 +00:00
|
|
|
###CFLAGS := /D__DOS__ /DMOO_ENABLE_STATIC_MODULE /DNDEBUG
|
|
|
|
CFLAGS := /D__DOS__ /DMOO_ENABLE_STATIC_MODULE /DMOO_BUILD_DEBUG
|
2017-01-10 10:50:26 +00:00
|
|
|
LDFLAGS := /xnovm /xregion=12m
|
|
|
|
|
2019-02-11 06:19:29 +00:00
|
|
|
# pf.c is a place holder file to work around the ICC bug of treating a
|
|
|
|
# dash inside a file name as an option.
|
2018-12-01 05:22:53 +00:00
|
|
|
LIBSRCS := \
|
2017-01-10 10:50:26 +00:00
|
|
|
bigint.c \
|
|
|
|
comp.c \
|
|
|
|
debug.c \
|
|
|
|
decode.c \
|
|
|
|
dic.c \
|
|
|
|
err.c \
|
|
|
|
exec.c \
|
2019-09-28 09:14:21 +00:00
|
|
|
fmt.c \
|
2017-01-10 10:50:26 +00:00
|
|
|
gc.c \
|
|
|
|
heap.c \
|
2019-09-28 09:14:21 +00:00
|
|
|
mb8.c \
|
2017-01-10 10:50:26 +00:00
|
|
|
moo.c \
|
2018-12-21 16:58:58 +00:00
|
|
|
number.c \
|
2017-01-10 10:50:26 +00:00
|
|
|
obj.c \
|
2018-11-30 15:19:33 +00:00
|
|
|
pf.c \
|
2017-01-10 10:50:26 +00:00
|
|
|
rbt.c \
|
2018-11-30 15:19:33 +00:00
|
|
|
std.c \
|
2017-01-10 10:50:26 +00:00
|
|
|
sym.c \
|
2018-11-30 15:19:33 +00:00
|
|
|
utf16.c \
|
2017-01-10 10:50:26 +00:00
|
|
|
utf8.c \
|
2018-12-01 05:22:53 +00:00
|
|
|
utl.c
|
|
|
|
|
|
|
|
EXESRCS := \
|
|
|
|
opt.c \
|
|
|
|
main.c
|
2017-01-10 10:50:26 +00:00
|
|
|
|
2018-12-01 05:22:53 +00:00
|
|
|
LIBOBJS := $(LIBSRCS:.c=.obj)
|
|
|
|
EXEOBJS := $(EXESRCS:.c=.obj)
|
2017-01-10 10:50:26 +00:00
|
|
|
|
2018-12-01 05:22:53 +00:00
|
|
|
LIBFILE=moo.lib
|
2017-01-10 10:50:26 +00:00
|
|
|
EXEFILE=moo.exe
|
|
|
|
MODFILE=..\mod\moomod.lib
|
2018-12-01 05:22:53 +00:00
|
|
|
LIBRSPFILE := $(LIBFILE,B,S/.*/&.RSP/)
|
|
|
|
EXERSPFILE := $(EXEFILE,B,S/.*/&.RSP/)
|
|
|
|
|
|
|
|
all: lib exe
|
|
|
|
|
|
|
|
# hlt.obj should be included into the library
|
|
|
|
# but for an unknown reason, the linker was not able to
|
|
|
|
# find the _halt_cpu symbol when halt.obj was added to
|
|
|
|
# the library. i suspect 386asm not producing a fully
|
|
|
|
# compatiable object file.
|
2017-01-10 10:50:26 +00:00
|
|
|
|
2018-12-01 05:22:53 +00:00
|
|
|
exe: hlt.obj $(EXEOBJS)
|
|
|
|
echo $(EXEOBJS) > $(EXERSPFILE)
|
|
|
|
echo hlt.obj >> $(EXERSPFILE)
|
|
|
|
echo $(LIBFILE) >> $(EXERSPFILE)
|
|
|
|
echo $(MODFILE) >> $(EXERSPFILE)
|
|
|
|
echo $(LDFLAGS) >> $(EXERSPFILE)
|
|
|
|
$(CC) @$(EXERSPFILE) /e $(EXEFILE)
|
2017-01-19 17:12:16 +00:00
|
|
|
|
2018-12-01 05:22:53 +00:00
|
|
|
lib: $(LIBOBJS)
|
|
|
|
echo > $(LIBRSPFILE)
|
|
|
|
!foreach x $(.NEWER)
|
|
|
|
modname /r $x >> $(LIBRSPFILE)
|
|
|
|
!end
|
|
|
|
echo compress >> $(LIBRSPFILE)
|
|
|
|
echo update >> $(LIBRSPFILE)
|
|
|
|
echo quit exit >> $(LIBRSPFILE)
|
|
|
|
del $(LIBFILE)
|
|
|
|
lib32 $(LIBFILE) batch < $(LIBRSPFILE)
|
2017-01-19 17:12:16 +00:00
|
|
|
|
|
|
|
hlt.obj: hlt.asm
|
|
|
|
386asm -twocase hlt.asm
|