1357f1050SThomas Veerman# This file is part of flex. 2357f1050SThomas Veerman 3357f1050SThomas Veerman# Redistribution and use in source and binary forms, with or without 4357f1050SThomas Veerman# modification, are permitted provided that the following conditions 5357f1050SThomas Veerman# are met: 6357f1050SThomas Veerman 7357f1050SThomas Veerman# 1. Redistributions of source code must retain the above copyright 8357f1050SThomas Veerman# notice, this list of conditions and the following disclaimer. 9357f1050SThomas Veerman# 2. Redistributions in binary form must reproduce the above copyright 10357f1050SThomas Veerman# notice, this list of conditions and the following disclaimer in the 11357f1050SThomas Veerman# documentation and/or other materials provided with the distribution. 12357f1050SThomas Veerman 13357f1050SThomas Veerman# Neither the name of the University nor the names of its contributors 14357f1050SThomas Veerman# may be used to endorse or promote products derived from this software 15357f1050SThomas Veerman# without specific prior written permission. 16357f1050SThomas Veerman 17357f1050SThomas Veerman# THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR 18357f1050SThomas Veerman# IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED 19357f1050SThomas Veerman# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 20357f1050SThomas Veerman# PURPOSE. 21357f1050SThomas Veerman 22357f1050SThomas Veerman 23357f1050SThomas VeermanFLEX = $(top_builddir)/flex 24357f1050SThomas Veerman 25357f1050SThomas Veermanbuilddir = @builddir@ 26357f1050SThomas Veerman 27357f1050SThomas VeermanEXTRA_DIST = scanner.l test.input main.c 28357f1050SThomas VeermanCLEANFILES = scanner.c scanner.h $(testname)$(EXEEXT) OUTPUT $(OBJS) 29357f1050SThomas VeermanOBJS = scanner.o main.o 30357f1050SThomas Veerman 31357f1050SThomas VeermanAM_CPPFLAGS = -I$(srcdir) -I$(top_srcdir) -I$(top_builddir) -I$(builddir) 32357f1050SThomas Veerman#LDFLAGS = $(top_srcdir)/libfl.a 33357f1050SThomas VeermanLFLAGS = --header="scanner.h" 34357f1050SThomas Veerman#YFLAGS = --defines --output=parser.c 35357f1050SThomas Veerman 36357f1050SThomas Veermantestname = test-header-r 37357f1050SThomas Veerman 38357f1050SThomas Veermanscanner.c: $(srcdir)/scanner.l 39357f1050SThomas Veerman $(FLEX) $(LFLAGS) $< 40357f1050SThomas Veerman 41357f1050SThomas Veermanparser.c: $(srcdir)/parser.y 42357f1050SThomas Veerman $(BISON) $(YFLAGS) $< 43357f1050SThomas Veerman 44357f1050SThomas Veerman$(testname)$(EXEEXT): $(OBJS) 45*0a6a1f1dSLionel Sambuc $(CC) $(CFLAGS) -o $@ $(LDFLAGS) $(OBJS) $(LOADLIBES) 46357f1050SThomas Veerman 47357f1050SThomas Veermantest: $(testname)$(EXEEXT) 48357f1050SThomas Veerman ./$(testname)$(EXEEXT) < $(srcdir)/test.input 49357f1050SThomas Veerman 50357f1050SThomas Veerman.c.o: 51357f1050SThomas Veerman $(CC) -c -o $@ $(AM_CPPFLAGS) $(CPPFLAGS) $(CFLAGS) $< 52357f1050SThomas Veerman 53357f1050SThomas Veermanscanner.h: scanner.c 54357f1050SThomas Veermanmain.o: scanner.h 55