
CC	= gcc # -Wall

# For GNU/Linux systems
CFLAGS	= -I. -O2	# -static
YACC	= bison -y

# For the Cygnus Win32 environment
#CFLAGS	= -DL_ENDIAN -DGNU_WIN32 -I. -O
#YACC	= byacc

# For OS/2
#CFLAGS	= -DL_ENDIAN -DOS2 -I. -O2
#YACC	= yacc
#LEX	= flex -l

# Everything else
#CFLAGS	= -I. -O
#YACC	= yacc

# You will amost certainly need this flag if you are compiling under
# a BSD or Linux system:-
LEX	= lex -l

# ----------------------------------------------------------------------
# You should not need to modify anything below here
#
OBJS	= fortify.o morpher.o gram.o lex.o index.o \
		os2lx.o os2obj.o os2page.o \
		misc.o md5_dgst.o md5_calc.o spans.o trace.o

MD5_OBJ	= md5_calc.o md5_dgst.o md5.o spans.o trace.o

all:	fortify md5

fortify: $(OBJS)
	$(CC) $(CFLAGS) $(OBJS) -o $@

md5:    $(MD5_OBJ)
	$(CC) $(CFLAGS) $(MD5_OBJ) -o $@


gram.o:	gram.y

lex.o:	lex.c y.tab.h

lex.c:	lex.l

lex.l:	y.tab.h

y.tab.h: gram.y
	$(YACC) -d gram.y

clean:
	-rm -f *.o
	-rm -f y.tab.h
	-rm -f y.tab.c
	-rm -f gram.c
	-rm -f lex.c
	-rm -f core
	-rm -f *.old
	-rm -f *.bak
