home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Frostbyte's 1980s DOS Shareware Collection
/
floppyshareware.zip
/
floppyshareware
/
FORTH
/
FLEX.ARC
/
MAKEFILE.UNX
< prev
next >
Wrap
Text File
|
1988-10-09
|
1KB
|
73 lines
# make file for "flex" tool
# the first time around use "make first_flex"
SKELETON_FILE = \"/usr/local/lib/flex.skel\"
F_SKELETON_FILE = \"/usr/local/lib/flex.fastskel\"
SKELFLAGS = -DDEFAULT_SKELETON_FILE=$(SKELETON_FILE) \
-DFAST_SKELETON_FILE=$(F_SKELETON_FILE)
CFLAGS = -O -DSV
LDFLAGS =
FLEX_FLAGS = -ist
FLEX = flex
FLEXOBJS = \
ccl.o \
dfa.o \
ecs.o \
main.o \
misc.o \
nfa.o \
parse.o \
scan.o \
sym.o \
tblcmp.o \
yylex.o
FLEX_C_SOURCES = \
ccl.c \
dfa.c \
ecs.c \
main.c \
misc.c \
nfa.c \
parse.c \
scan.c \
sym.c \
tblcmp.c \
yylex.c
flex : $(FLEXOBJS)
cc $(CFLAGS) -o flex $(LDFLAGS) $(FLEXOBJS)
first_flex:
cp scan.c.dist scan.c
make $(MFLAGS) flex
parse.h parse.c : parse.y
yacc -d parse.y
@mv y.tab.c parse.c
@mv y.tab.h parse.h
# comment-out the next two lines after a successful "make test" and
# comment-in the following two lines.
scan.c : scan.l
$(FLEX) $(FLEX_FLAGS) scan.l >scan.c
scan.o : scan.c parse.h
main.o : main.c
cc $(CFLAGS) -c $(SKELFLAGS) main.c
flex.lint : $(FLEX_C_SOURCES)
@echo "Expect a \"may be used before set\" and 2 \"unused\"'s
lint $(FLEX_C_SOURCES) > flex.lint
clean :
rm -f core errs flex *.o parse.c *.lint parse.h
test :
$(FLEX) $(FLEX_FLAGS) scan.l | diff scan.c -