# makefile to compile MCPP version 2.7.1 and later for Borland C / BC make # 2008/11 kmatsui # You must first edit BINDIR, INCDIR, LIBDIR and LINKER according to your # system. # To make compiler-independent-build of MCPP do: # make # make install # To make Borland-C-specific-build of MCPP do: # make -DCOMPILER=BORLANDC # make -DCOMPILER=BORLANDC install # To re-compile MCPP using Borland-C-specific-build of MCPP do: # make -DCOMPILER=BORLANDC -DPREPROCESSED # make -DCOMPILER=BORLANDC -DPREPROCESSED install # To link kmmalloc V.2.5.1 (malloc() package of kmatsui) or later do: # make [-DPREPROCESSED] -DKMMALLOC # make [-DPREPROCESSED] -DKMMALLOC install # To make mcpp.lib (subroutine-build of mcpp) do: # make -DMCPP_LIB mcpplib # make -DMCPP_LIB mcpplib_install # To make testmain.c (sample to use mcpp.lib) against mcpp.lib do # (add '-DDLL_IMPORT' to link against the DLL): # make [-DOUT2MEM] testmain # make [-DOUT2MEM] testmain_install NAME = mcpp CC = bcc32 CFLAGS = $(CFLAGS) -c -a -d -f- -G -5 -DWIN32 # -DWIN32 is nessecary to compile with bcc32 LINKFLAGS = -e$(NAME) !if $d( COMPILER) CPPFLAGS = -DCOMPILER=BORLANDC # BINDIR : Adjust to your system. # for Borland C V.5.5 CFLAGS = $(CFLAGS) -Oi BINDIR = \PUB\COMPILERS\BCC55\BIN !else BINDIR = \PUB\BIN !endif !if $d( KMMALLOC) MEM_MACRO = -DKMMALLOC=1 -D_MEM_DEBUG=1 -DXMALLOC=1 MEMLIB = kmmalloc_debug32.lib !else MEM_MACRO = MEM_LIB = !endif OBJS = main.obj directive.obj eval.obj expand.obj support.obj system.obj \ mbchar.obj all: $(NAME).exe $(NAME).exe : $(OBJS) $(CC) $(LINKFLAGS) $(OBJS) $(MEMLIB) !if $d( PREPROCESSED) # Make a "pre-preprocessed" header file to recompile MCPP with MCPP. mcpp.H : system.H noconfig.H internal.H $(BINDIR)\$(NAME) $(CPPFLAGS) $(MEM_MACRO) preproc.c mcpp.H $(OBJS) : mcpp.H !else main.obj directive.obj eval.obj expand.obj support.obj system.obj mbchar.obj: \ system.H internal.H noconfig.H !endif !if $d( PREPROCESSED) .c.obj : $(BINDIR)\$(NAME) -DPREPROCESSED=1 $(CPPFLAGS) $< $(