CP = copy # what 'cp' to use. RM = del # what 'rm' to use. MV = ren # What 'mv' to use. LINKER = \usr\lib\bin\tlink.exe # What link to use. CC = tcc # What C compiler I am using. INCLUDE = \usr\lib\tinclude # Where to find header files. .h LIB = \usr\lib\tlib # Where to find the libary files. .lib MAPFILE = \dev\nul # Where to put the link map file. # switches for TurboC.... MODEL = l # t)iny s)mall c)ompact m)edium l)arge h)uge MDL = $(MODEL) # The masm model. CPU = 1 # 0=8088 1=186/286 MATH = f # f87=8087 f=emulate f-=no floating MATHLIB = emu # emu, f87, or nothing TYPE = G # G=speed O=size SWITCHES= -I$(INCLUDE) -L$(LIB) -m$(MODEL) -$(CPU) -$(MATH) \ -$(TYPE) CFLAGS = $(SWITCHES) # Print the `make -h' message .HELP # The order to search for rules and files is specified by .SUFFIXES .SUFFIXES: .exe .obj .c .for .asm # DEFAULT RULES .asm.obj: masm $*.asm; .c.obj: $(CC) $(CFLAGS) -c $*.c .for.obj: for1 $*.for; pas2 .obj.exe: $(CP) $(LINKER) .\link.exe link $(LIB)\c0$(MODEL) $(OBJS), $@, $(MAPFILE), \ $(LIB)\$(MATHLIB) $(LIB)\math$(MODEL) $(LIB)\c$(MODEL) $(RM) .\link.exe $(CP) $(PROGRAM) $(DEST) # .obj.exe: # link $*.obj, $@, $(MAPFILE), $(LIBS) .asm.exe: masm $*.asm; link $*.obj, $@, $(MAPFILE), $(LIBS) $(RM) $*.obj .c.exe: $(CC) $(CFLAGS) -c $*.c link $*.obj, $@; $(RM) $*.obj .for.exe: for1 $*.for; pas2 link $*.obj, $@, $(MAPFILE), $(LIB)\FORTRAN.LIB