home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Power Programming
/
powerprogramming1994.iso
/
progtool
/
c
/
abmake14.arc
/
default.mk
< prev
next >
Wrap
Makefile
|
1989-08-10
|
2KB
|
109 lines
### this is the default makefile, DEFAULT.MK
SUFFIXES = .exe .com .obj .asm .c .l .y .ec .h .bat
.SUFFIXES: $(SUFFIXES)
.RESPONSE:
$(LINK.s)
# Misc section
AR = lib
RM = remove
CP = copy
# LINK section
LINK.s = link
CO = /CO
LDEF =
LFLAGS = $(CO) $(LDEF)
LINK = $(LINK.s) $(LFLAGS)
LINK.c = cl
LN = $(LINK.c) $(CFLAGS)
.obj.exe:
$(LINK) $*,,, FLASH UTILITY
.exe.com:
exe2bin $< $@
# C section
COMPILE.c = cl
MODEL = S
CV = -Zi
OPT = -Ox
CDEF =
MATH =
CFLAGS = -A$(MODEL) $(OPT) $(MATH) $(CV) $(CDEF)
CC = $(COMPILE.c) $(CFLAGS)
.c.exe :
$(CC) $< -link $(LDEF) FLASH UTILITY
if errorlevel 0 $(RM) $*.obj
.c.obj :
$(CC) -c $<
# D section (ANSI C declaration headers)
.c.d :
echo #ifndef NOPROTOTYPES > $*.tmp
$(CC) -DNOPROTOTYPES -Zg $< >> $*.tmp
echo #endif >> $*.tmp
+updexhdr $*.tmp $*.d
if errorlevel 0 $(RM) $*.tmp
# ASM section
COMPILE.s = masm
ADEF =
AFLAGS = -v -Ml -X -w2 -p $(CV) $(ADEF)
AS = $(COMPILE.s) $(AFLAGS)
.asm.com :
$(AS) $<;
$(LINK) $*,,, FLASH UTILITY;
$(RM) $*.com $*.obj
exe2bin $*.exe $*.com
if errorlevel 0 $(RM) $*.exe
.asm.exe:
$(AS) $<;
$(LINK) $*,,, FLASH UTILITY;
if errorlevel 0 $(RM) $*.obj
.asm.obj:
$(AS) $<;
# Lex section
LEX = flex
LXFLAGS = -I
LEX.l = $(LEX) $(LXFLAGS) -t
.l.exe:
$(LEX.l) $< > $*.c
$(LINK.c) -o $@ $*.c
$(RM) $*.obj $*.c
.l.c:
$(LEX.l) $< > $@
.l.o:
$(LEX.l) $< > $*.c
$(COMPILE.c) /Fo$*.o $*.c
$(RM) $*.c
.l.obj:
$(LEX.l) $< > $*.c
$(COMPILE.c) $*.c
$(RM) $*.c
# YACC Section
YACC = bison
YFLAGS =
YACC.y = $(YACC) $(YFLAGS)
.y.exe:
$(YACC.y) $<
$(LINK.c) -o $@ $*.c
$(RM) $*.obj $*.c
.y.h:
$(YACC.y) -d -y $<
$(RM) ytab.c
$(MV) ytab.h $@
.y.c:
$(YACC.y) $<
.y.o:
$(YACC.y) $<
$(COMPILE.c) /Fo$*.o $*.c
$(RM) $*.c
.y.obj:
$(YACC.y) $<
$(COMPILE.c) $*.c
$(RM) $*.c