home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Frozen Fish 1: Amiga
/
FrozenFish-Apr94.iso
/
bbs
/
alib
/
d1xx
/
d156
/
flex.lha
/
Flex
/
Flex1
/
Makefile
< prev
next >
Wrap
Makefile
|
1988-10-02
|
1KB
|
79 lines
# make file for "flex" tool
# the first time around use "make first_flex"
SKELETON_FILE = \"/pgt/lib/flex.skel\"
F_SKELETON_FILE = \"/pgt/lib/flex.fastskel\"
SKELFLAGS = -DDEFAULT_SKELETON_FILE=$(SKELETON_FILE) \
-DFAST_SKELETON_FILE=$(F_SKELETON_FILE)
CC = gcc
CFLAGS = -O
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
bison -d parse.y
@mv parse.tab.c parse.c
@mv parse.tab.h parse.h
#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 -