
#
# Portable Object Compiler
#

#
# This Makefile should work with Sybase WATCOM wmake.
#

LEX=flex
LEXYYC=lexyy.c
RM=del
CP=copy
OBJC=objc
DBG_MFLAGS=-q -d2 -od
OPT_MFLAGS=-q -DNDEBUG

MFLAGS = $(DBG_MFLAGS) -inlinecache -postlink -retain

PROGRAM=words.exe
OBJFILES = token.obj words.obj

.SUFFIXES: .m .lm

.m.obj:
	$(OBJC) -c $*.m $(MFLAGS)

.lm.obj:
	$(LEX) $*.lm
	-$(CP) $(LEXYYC) $*.m
	$(OBJC) -c $(MFLAGS) $(IFLAGS) $*.m
	-$(RM) $*.m

$(PROGRAM) : $(OBJFILES)
	$(OBJC) $(MFLAGS) $(OBJFILES) -o $(PROGRAM)

cleantmp : .SYMBOLIC
	-$(RM) *.P
	-$(RM) *.c
	-$(RM) *.i

.NOCHECK
clean : cleantmp
	-$(RM) *.obj
	-$(RM) $(PROGRAM)

.NOCHECK
distclean : clean
	-$(RM) Makefile 

