make.ini (1715B)
1 # This is a sample `make.ini' file for NDMAKE v3.8. You will probably want 2 # to customize it for your system. 3 4 5 # The order to search for rules and files is specified by .SUFFIXES 6 .SUFFIXES : .exe .obj .c .for .asm 7 8 # A few macros. 9 CFLAGS = -A$(MODEL) 10 MODEL = S 11 SETARGV = $(LIB)\$(MODEL)SETARGV 12 LIBS = 13 BIN = 14 LFLAGS = 15 16 # A universally useful target. 17 clean: 18 +-erase *.bak 19 +-erase *.map 20 21 # .BEFORE and .AFTER can be used to turn DPATH off and on. 22 .BEFORE:; @+echo For help with ndmake, use the command `make -h' 23 .AFTER:; @+echo All done. 24 25 26 # DEFAULT RULES 27 # To produce a `.obj' file from a `.asm' file using MASM. 28 .asm.obj:; masm $*.asm; 29 30 # To produce a `.obj' file from a `.c' file using Microsoft C. 31 .c.obj:; cl $(CFLAGS) -c $*.c 32 33 # To produce a `.obj' file from a `.for' file using Microsoft Fortran. 34 .for.obj: 35 for1 $*.for; 36 pas2 37 38 # To produce a `.exe' file from an `.obj' file. Note that there is a 39 # problem because LIBS may be different for linking `.obj' files 40 # produced by different compilers (C, FORTRAN, PASCAL, etc). To avoid 41 # this problem you may want to have the C compiler produce `.cbj' files, 42 # the FORTRAN compiler produce `.fbj' files, etc. Then you could write 43 # specific rules for `.cbj.exe' and `.fbj.exe' which would use the correct 44 # libraries. 45 .obj.exe: 46 link $*.obj $(SETARGV), $@,, $(LIBS) $(LFLAGS); 47 48 # To produce a `.exe' file from a `.asm' file. 49 .asm.exe: 50 masm $*.asm; 51 link $*.obj, $@,, $(LIBS) 52 erase $*.obj 53 54 # To produce a `.exe' file from a `.c' file. 55 .c.exe: 56 cl $(CFLAGS) -c $*.c 57 link $*.obj $(SETARGV), $@,, $(LIBS) $(LFLAGS) 58 erase $*.obj 59 60 # To produce a `.exe' file from a `.for' file. 61 .for.exe: 62 for1 $*.for; 63 pas2 64 link $*.obj, $@,, $(LIB)\FORTRAN.LIB 65 erase $*.obj