update dev300-m58
[ooovba.git] / dmake / msdos / config.mk
blob77a32bf419de54ab2f7397fdc395519bd637f03d
1 # This is an OS specific configuration file
2 # It assumes that OBJDIR, TARGET and DEBUG are previously defined.
3 # It defines CFLAGS, LDARGS, CPPFLAGS, STARTUPFILE, LDOBJS
4 # It augments SRC, OBJDIR, TARGET, CFLAGS, LDLIBS
7 # Memory model to compile for
8 # set to s - small, m - medium, c - compact, l - large
9 # Need large model now, dmake has grown up :-)
10 MODEL = l
12 STARTUPFILE = $(OS)/startup.mk
14 CPPFLAGS = $(CFLAGS)
15 LDOBJS = $(CSTARTUP) $(OBJDIR)/{$(<:f)}
16 LDARGS = $(LDHEAD) $(LDFLAGS:s/ //) @$(LDTMPOBJ),$(TARGET),NUL.MAP$(LDTAIL)
17 LDTAIL = $(_libs)
18 _libs = $(!null,$(LDLIBS) ,@$(LDTMPLIB))
19 LDTMPOBJ = $(mktmp,,$(DIVFILE) $(LDOBJS:s,/,\\,:t"+\n")\n)
20 LDTMPLIB = $(mktmp,,$(DIVFILE) $(LDLIBS:s,/,\\,:t"+\n")\n)
22 # Debug flags
23 DB_CFLAGS = -DDBUG
24 DB_LDFLAGS =
25 DB_LDLIBS =
27 # NO Debug flags
28 NDB_CFLAGS =
29 NDB_LDFLAGS =
30 NDB_LDLIBS =
32 # Local configuration modifications for CFLAGS.
33 CFLAGS += -I$(OS)
35 # Common MSDOS source files.
36 # Define SWAP to anything but 'y' for the swap code to be excluded on making.
37 # Swapping for DOS versions is enabled by default.
38 # Note: swapping is handled specially for ZTC in msdos/zortech/config.mk.
39 SWAP *= y
41 .IF $(OSRELEASE) != zortech
42 .IF $(SWAP) == y
43 SWP_SRC += spawn.c
44 ASRC += exec.asm
45 .ELSE
46 SWP_SRC += tee.c
47 .END
48 .ELSE
49 SWP_SRC += tee.c
50 .END
52 OS_SRC += ruletab.c dirbrk.c runargv.c arlib.c dchdir.c switchar.c rmprq.c\
53 $(SWP_SRC) find.c dirlib.c dstrlwr.c
54 UNIXSRC := dcache.c
55 SRC += $(OS_SRC) $(UNIXSRC)
56 .SETDIR=$(OS) : $(ASRC) $(OS_SRC)
57 .SETDIR=unix : $(UNIXSRC)
59 # Provide our own %$O : %$S rule.
60 %$O : %$S
61 +$(AS) $(ASFLAGS) $(<:s,\,${__.DIVSEP-sh-${USESHELL}},:s,/,${__.DIVSEP-sh-${USESHELL}},),,,;
62 mv $(@:f) $(OBJDIR)
64 # Set source dirs so that we can find files named in this
65 # config file.
66 .SOURCE.h : $(OS)
68 # See if we modify anything in the lower levels.
69 .IF $(OSRELEASE) != $(NULL)
70 .INCLUDE : $(OS)$(DIRSEPSTR)$(OSRELEASE)$(DIRSEPSTR)config.mk
71 .END