home *** CD-ROM | disk | FTP | other *** search
- # If .NOIG is used, it *must* be the first directive in this file.
- #.NOIG
-
- # The order to search for rules and files is specified by .SUFFIXES
- .SUFFIXES : .exe .obj .c .for .asm .y .lxi
-
- # The directory NDMAKE uses for temporary file
- MAKE_TMP = $(TMP)
-
- # Macros for compilers and assemblers.
- AS = masm
- CC = cl
- LEX = lex
- YACC = yacc
- YFLAGS = -hi
- #HPATH = -I..\incl
- HPATH =
- DEBUG = -Ox
- CFLAGS = -A$(MODEL) -J -DLINT_ARGS $(DEBUG) $(HPATH)
- MODEL = L
- VARSTK = $(LIB)$(MODEL)VARSTK
- SETARGV = $(LIB)SETARGV
- LIBS = lex.lib
- LINKFLAGS = /NOE
- BIN =
-
- # DEFAULT RULES
- #
- # ASM -> OBJ using MASM.
- .asm.obj:
- ${AS} $<;
-
- # C -> OBJ using Microsoft C.
- .c.obj:
- ${CC} ${CFLAGS} -c $<
-
- # FOR -> OBJ using Microsoft Fortran.
- .for.obj:
- for1 $<;
- pas2
-
- # Y -> C, for YACC
- #.y.c:
- # $(YACC) $(YFLAGS) $<
- # mv ytab.c $@
- #
- #.y.obj:
- # $(YACC) $(YFLAGS) $<
- # grep ^#.*define ytab.h | sed "s/^#define \([^ ]*\) [^ ]*$$/ \"\1\",/" >tok.h
- # ${CC} ${CFLAGS} -c ytab.c
- # rm ytab.c
- # mv ytab.obj $@
-
- # L -> C, for LEX
- .lxi.c:
- $(LEX) -i $< -o lextab.c -t $*
- grep -v ^#line <lextab.c >temp
- copy temp lextab.c
- mv lextab.c $@
- #
- .lxi.obj:
- $(LEX) -i $< -o lextab.c -t $*
- grep -v ^#line <lextab.c >temp.c
- ${CC} ${CFLAGS} -c temp.c
- rm temp.c lextab.c
- mv temp.obj $@
-
-
- # To produce a `.exe' file from an `.obj' file. Note that there is a
- # problem because LIBS may be different for linking `.obj' files
- # produced by different compilers (C, FORTRAN, PASCAL, etc). To avoid
- # this problem you may want to have the C compiler produce `.cbj' files,
- # the FORTRAN compiler produce `.fbj' files, etc. Then you could write
- # specific rules for `.cbj.exe' and `.fbj.exe' which would use the correct
- # libraries.
- .obj.exe:
- link $< $(SETARGV), $@,, $(LIBS) $(LINKFLAGS);
-
- # To produce a `.exe' file from a `.asm' file.
- .asm.exe:
- ${AS} $<;
- link $*.obj, $@,, $(LIBS)
-
- # To produce a `.exe' file from a `.c' file.
- .c.exe:
- ${CC} $(CFLAGS) -c $<
- link $*.obj $(SETARGV), $@,, $(LIBS) $(LINKFLAGS);
-
- # To produce a `.exe' file from a `.for' file.
- .for.exe:
- for1 $<;
- pas2
- link $*.obj, $@,, $(LIB)\FORTRAN
-
- # A universally useful target so "make clean" always works.
- clean:
- -(erase *.bak; erase *.map)
-