Category : C Source Code
Archive   : DMAKE38B.ZIP
Filename : CONFIG.MK

 
Output of file : CONFIG.MK contained in archive : DMAKE38B.ZIP
# This is the Turbo C++ 2.0 DOS configuration file for DMAKE
# It simply modifies the values of SRC, and checks to see if
# OSENVIRONMENT is defined. If so it includes the appropriate
# config.mk file.
#
# It also sets the values of .SOURCE.c and .SOURCE.h to include the local
# directory.
#
osrdir := $(OS)$(DIRSEPSTR)$(OSRELEASE)

# Definition of macros for library, and C startup code.
LDLIBS = d:/cc/bcc/lib/c$(MODEL)
CSTARTUP = d:/cc/bcc/lib/c0$(MODEL).obj

# The following sources are required for TURBO C++ 2.0
OSR_SRC = tempnam.c utime.c
.SETDIR=$(osrdir) : $(OSR_SRC)

SRC += $(OSR_SRC)
.SOURCE.h : $(osrdir)

# Local configuration modifications for CFLAGS. Make sure your turboc.cfg
# file contains a -D__STDC__=1 and -DM_I86=1, if not then uncomment the line
# below!
#CFLAGS += -DM_I86=1 -D__STDC__=1

# You can get a smaller executable still, buy adding a -1 to the list of
# flags below, but then you can't run this on an 8086/88 cpu.
#CFLAGS += -1
CFLAGS += -I$(osrdir) -d -O -N- -w-nod $(C_$(MODEL))
ASFLAGS += -t -mx $(S_$(MODEL))

# Debugging information for Turbo-C
DB_CFLAGS += -v
DB_LDFLAGS += /v

# See if we modify anything in the lower levels.
.IF $(OSENVIRONMENT) != $(NULL)
.INCLUDE .IGNORE : $(osrdir)$(DIRSEPSTR)$(OSENVIRONMENT)$(DIRSEPSTR)config.mk
.END

C_s =
C_m = -mm
C_c = -mc
C_l = -ml

S_s = -dmsmall
S_m = -dmmedium
S_c = -dmcompact
S_l = -dmlarge
# This is an OS specific configuration file
# It assumes that OBJDIR, TARGET and DEBUG are previously defined.
# It defines CFLAGS, LDARGS, CPPFLAGS, STARTUPFILE, LDOBJS
# It augments SRC, OBJDIR, TARGET, CFLAGS, LDLIBS
#

# Memory model to compile for
# set to s - small, m - medium, c - compact, l - large
# Need large model now, dmake has grown up 🙂
MODEL = l

STARTUPFILE = $(OS)/startup.mk

CPPFLAGS = $(CFLAGS)
LDOBJS = $(CSTARTUP) $(OBJDIR)/{$(<:f)}
LDARGS = $(LDHEAD) @$(LDTMPOBJ),$(TARGET),NUL.MAP$(LDTAIL)
LDTAIL = $(_libs)$(LDFLAGS:s/ //)
_libs = $(!null,$(LDLIBS) ,@$(LDTMPLIB))
LDTMPOBJ = $(mktmp,,$(DIVFILE) $(LDOBJS:s,/,\\,:t"+\n")\n)
LDTMPLIB = $(mktmp,,$(DIVFILE) $(LDLIBS:s,/,\\,:t"+\n")\n)

# Debug flags
DB_CFLAGS = -DDBUG
DB_LDFLAGS =
DB_LDLIBS =

# NO Debug flags
NDB_CFLAGS =
NDB_LDFLAGS =
NDB_LDLIBS =

# Local configuration modifications for CFLAGS.
CFLAGS += -I$(OS)

# Common MSDOS source files.
# Define SWAP to anything but 'y' for the swap code to be excluded on making.
# Swapping for DOS versions is enabled by default.
# Note: swapping is handled specially for ZTC in msdos/ztcdos/config.mk.
SWAP *= y
.IF $(OSRELEASE) != ztcdos
.IF $(SWAP) == y
SWP_SRC = find.c spawn.c
ASRC += exec.asm
.ELSE
SWP_SRC = tee.c
.END
.ELSE
SWP_SRC = tee.c
.END

OS_SRC += ruletab.c dirbrk.c runargv.c arlib.c _chdir.c switchar.c rmprq.c\
$(SWP_SRC)
SRC += $(OS_SRC)
.SETDIR=$(OS) : $(ASRC) $(OS_SRC)

# Provide our own %$O : %$S rule.
%$O : %$S
$(AS) $(ASFLAGS) $(<:s,/,\,);
mv $(@:f) $(OBJDIR)

# Set source dirs so that we can find files named in this
# config file.
.SOURCE.h : $(OS)

# See if we modify anything in the lower levels.
.IF $(OSRELEASE) != $(NULL)
.INCLUDE .IGNORE : $(OS)$(DIRSEPSTR)$(OSRELEASE)$(DIRSEPSTR)config.mk
.END
# This is the MSC 4.0 and higher DOS configuration file for DMAKE
# It simply modifies the values of SRC, and checks to see if
# OSENVIRONMENT is defined. If so it includes the appropriate
# config.mk file.
#
# It also sets the values of .SOURCE.c and .SOURCE.h to include the local
# directory.
#
osrdir := $(OS)$(DIRSEPSTR)$(OSRELEASE)

TMPDIR :=
.EXPORT : TMPDIR

# Definition of macros for library, and C startup code.

# The following sources are required for MSC
OSR_SRC = tempnam.c
.SETDIR=$(osrdir) : $(OSR_SRC)

SRC += $(OSR_SRC)
.SOURCE.h : $(osrdir)

SET_STACK = /stack:4096
NDB_LDFLAGS += $(SET_STACK)

# Local configuration modifications for CFLAGS
# If you have a 286 or better, you can uncomment the following line.
#HAVE_286 = y

.IF $(HAVE_286)
CFLAGS += -G2
ASFLAGS += -Dhave286
.END

ASFLAGS += -t -mx $(S_$(MODEL))

# Microsoft C doesn't need tail but needs head
LDTAIL = ;
LDHEAD = $(LDFLAGS)

# Debugging libraries
DB_LDFLAGS += /co /li /map $(SET_STACK)
DB_LDLIBS +=

# NO Debug MSC flags:
# Set the environment variable MSC_VER to be one of 4.0, 5.0, 5.1, or 6.0
# to get these by default when you make dmake using 'dmake'.
#
# Setting MSC_VER to one of the above sets the variable _MSC_VER appropriately
# and sets the flags appropriately.

.IMPORT .IGNORE : MSC_VER
MSC_VER *= 6.0 # If unset, assume 6.0 by default.

.IF $(MSC_VER) == 4.0
CFLAGS += -I$(osrdir) $(C_$(MODEL):s/A/m/)
CFLAGS += -DM_I86=1 # 5.0+ define this automatically
# CFLAGS += -D__STDC__=1 # 5.0, 5.1, but not 6.0 do this automatically
NDB_CFLAGS +=
DB_CFLAGS += -Zi
.ELSE
DB_CFLAGS += -Zi
CFLAGS += -I$(osrdir) $(C_$(MODEL))
.IF $(MSC_VER) != 6.0
# For 5.0 and 5.1, we define _MSC_VER=500 or 510
CFLAGS += -D_MSC_VER=$(MSC_VER:s,.,,)0
NDB_CFLAGS += -Oscl -Gs
.ELSE
# Microsoft C 6.0 auto defines _MSC_VER=600, but not __STDC__
CFLAGS += -D__STDC__=1 # incredibly not auto done by 6.0
NDB_CFLAGS += -Osecgl -Gs

# Redefine rule for making our objects, we don't need mv
%$O : %.c ;% $(CC) -c $(CFLAGS) -Fo$@ $<
.END
NDB_LDFLAGS += /exe /packc /batch
NDB_LDLIBS +=
.END

# See if we modify anything in the lower levels.
.IF $(OSENVIRONMENT) != $(NULL)
.INCLUDE .IGNORE : $(osrdir)$(DIRSEPSTR)$(OSENVIRONMENT)$(DIRSEPSTR)config.mk
.END

C_s =
C_m = -AM
C_c = -AC
C_l = -AL

S_s = -Dmsmall
S_m = -Dmmedium
S_c = -Dmcompact
S_l = -Dmlarge
# This is the Turbo C 2.0 DOS configuration file for DMAKE
# It simply modifies the values of SRC, and checks to see if
# OSENVIRONMENT is defined. If so it includes the appropriate
# config.mk file.
#
# It also sets the values of .SOURCE.c and .SOURCE.h to include the local
# directory.
#
osrdir := $(OS)$(DIRSEPSTR)$(OSRELEASE)

# Definition of macros for library, and C startup code.
LDLIBS = d:/cc/tcc/lib/c$(MODEL)
CSTARTUP = d:/cc/tcc/lib/c0$(MODEL).obj

# The following sources are required for TURBO C 2.0
OSR_SRC = tempnam.c utime.c
.SETDIR=$(osrdir) : $(OSR_SRC)

SRC += $(OSR_SRC)
.SOURCE.h : $(osrdir)

# Local configuration modifications for CFLAGS. Make sure your turboc.cfg
# file contains a -D__STDC__=1 and -DM_I86=1, if not then uncomment the line
# below!
#CFLAGS += -DM_I86=1 -D__STDC__=1

# You can get a smaller executable still, buy adding a -1 to the list of
# flags below, but then you can't run this on an 8086/88 cpu.
#CFLAGS += -1
CFLAGS += -I$(osrdir) -f- -d -O -N- -w-nod $(C_$(MODEL))
ASFLAGS += -t -mx $(S_$(MODEL))

# Debugging information for Turbo-C
DB_CFLAGS += -v
DB_LDFLAGS += /v

# See if we modify anything in the lower levels.
.IF $(OSENVIRONMENT) != $(NULL)
.INCLUDE .IGNORE : $(osrdir)$(DIRSEPSTR)$(OSENVIRONMENT)$(DIRSEPSTR)config.mk
.END

C_s =
C_m = -mm
C_c = -mc
C_l = -ml

S_s = -dmsmall
S_m = -dmmedium
S_c = -dmcompact
S_l = -dmlarge
# This is the ZTC DOS configuration file for DMAKE
# It simply modifies the values of SRC, and checks to see if
# OSENVIRONMENT is defined. If so it includes the appropriate
# config.mk file.
#
# It also sets the values of .SOURCE.c and .SOURCE.h to include the local
# directory.
#
osrdir := $(OS)$(DIRSEPSTR)$(OSRELEASE)

TMPDIR :=
.EXPORT : TMPDIR

# Definition of macros for library, and C startup code.
# Swapping for DOS versions is enabled by default. ZTC will automatically
# perform swapping to XMS, EMS or disk by including _swapl.obj at link time.
# To be most effective, _swapl.obj should be the first file linked so we
# assign it to CSTARTUP if needed.
.IF $(SWAP) == y
CSTARTUP = _swapl.obj
.END

# The following sources are required for ZTC
# The tempnam supplied with ZTC doesn't handle a NULL dir.
OSR_SRC = tempnam.c environ.c
.SETDIR=$(osrdir) : $(OSR_SRC)

SRC += $(OSR_SRC)
.SOURCE.h : $(osrdir)

# Local configuration modifications for CFLAGS
# If you have a 286, you can use -2 or appropriate to get better code,
# in that case uncomment the line below. (You can also simply set
# it in the CL environment variable.)
#CFLAGS += -2
ASFLAGS += -t -mx $(S_$(MODEL))

# Redefine this, it isn't needed!
LDTAIL = ;

# Debugging libraries
DB_LDFLAGS += -g
DB_LDLIBS +=

# NO Debug ZTC flags:
#

CFLAGS += -I$(osrdir) $(C_$(MODEL))
CFLAGS += -DM_I86=1 -DMSDOS
CFLAGS += -b # use large compiler
#CFLAGS += -w # no warnings
CFLAGS += -mi # integer only
CFLAGS += -p # no auto-prototyping
NDB_CFLAGS += -o
DB_CFLAGS += -g

# Redefine rule for making our objects, we don't need mv
%$O : %.c ;% $(CC) -c $(CFLAGS) -o$@ $<

# See if we modify anything in the lower levels.
.IF $(OSENVIRONMENT) != $(NULL)
.INCLUDE .IGNORE : $(osrdir)$(DIRSEPSTR)$(OSENVIRONMENT)$(DIRSEPSTR)config.mk
.END

C_s =
C_m = -mM
C_c = -mC
C_l = -mL

S_s = -Dmsmall
S_m = -Dmmedium
S_c = -Dmcompact
S_l = -Dmlarge


  3 Responses to “Category : C Source Code
Archive   : DMAKE38B.ZIP
Filename : CONFIG.MK

  1. Very nice! Thank you for this wonderful archive. I wonder why I found it only now. Long live the BBS file archives!

  2. This is so awesome! 😀 I’d be cool if you could download an entire archive of this at once, though.

  3. But one thing that puzzles me is the “mtswslnkmcjklsdlsbdmMICROSOFT” string. There is an article about it here. It is definitely worth a read: http://www.os2museum.com/wp/mtswslnk/