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 Veermanbuilddir = @builddir@ 25357f1050SThomas Veerman 26357f1050SThomas VeermanEXTRA_DIST = scanner-1.l scanner-2.l main.cpp test.input 27357f1050SThomas VeermanCLEANFILES = scanner-1.cpp $(testname)$(EXEEXT) OUTPUT $(OBJS) scanner-2.cpp 28357f1050SThomas VeermanOBJS = scanner-1.o scanner-2.o main.o 29357f1050SThomas Veerman 30357f1050SThomas VeermanAM_CXXFLAGS = -I$(srcdir) -I$(top_srcdir) -I$(top_builddir) 31357f1050SThomas Veerman#LDFLAGS = $(top_srcdir)/libfl.a 32357f1050SThomas Veerman#YFLAGS = --defines --output=parser.c 33357f1050SThomas Veerman 34357f1050SThomas Veermantestname = test-c++-multiple-scanners 35357f1050SThomas Veerman 36357f1050SThomas Veermanscanner-1.cpp: $(srcdir)/scanner-1.l 37357f1050SThomas Veerman $(FLEX) -+ $(LFLAGS) $< 38357f1050SThomas Veerman 39357f1050SThomas Veermanscanner-2.cpp: $(srcdir)/scanner-2.l 40357f1050SThomas Veerman $(FLEX) -+ $(LFLAGS) $< 41357f1050SThomas Veerman 42357f1050SThomas Veerman$(testname)$(EXEEXT): $(OBJS) 43*0a6a1f1dSLionel Sambuc $(CXX) $(CXXFLAGS) -o $@ $(LDFLAGS) $(OBJS) $(LOADLIBES) 44357f1050SThomas Veerman 45357f1050SThomas Veermantest: $(testname)$(EXEEXT) 46357f1050SThomas Veerman $(builddir)/$(testname)$(EXEEXT) < $(srcdir)/test.input 47357f1050SThomas Veerman 48357f1050SThomas Veerman.cpp.o: 49357f1050SThomas Veerman $(CXX) -c -o $@ $(AM_CXXFLAGS) $(CPPFLAGS) $(CXXFLAGS) $< 50357f1050SThomas Veerman 51357f1050SThomas Veermanmain.o: scanner-1.h scanner-2.h 52357f1050SThomas Veermanscanner-1.h: scanner-1.cpp 53357f1050SThomas Veermanscanner-2.h: scanner-2.cpp 54