xref: /minix3/external/bsd/flex/dist/tests/test-c++-basic/Makefile.am (revision 0a6a1f1d05b60e214de2f05a7310ddd1f0e590e7)
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 VeermanEXTRA_DIST = scanner.l test.input
26357f1050SThomas VeermanCLEANFILES = scanner.cpp scanner.h $(testname)$(EXEEXT) OUTPUT $(OBJS)
27357f1050SThomas VeermanOBJS = scanner.o
28357f1050SThomas Veerman
29357f1050SThomas VeermanAM_CPPFLAGS = -I$(srcdir) -I$(top_srcdir) -I$(top_builddir)
30357f1050SThomas VeermanLFLAGS = -+
31357f1050SThomas Veerman#LDFLAGS =
32357f1050SThomas Veerman
33357f1050SThomas Veermantestname = test-c++-basic
34357f1050SThomas Veerman
35357f1050SThomas Veermanscanner.cpp: $(srcdir)/scanner.l
36357f1050SThomas Veerman	$(FLEX) $(LFLAGS) $<
37357f1050SThomas Veerman
38357f1050SThomas Veerman$(testname)$(EXEEXT): $(OBJS)
39*0a6a1f1dSLionel Sambuc	$(CXX) $(CXXFLAGS) -o $@ $(LDFLAGS) $(OBJS) $(LOADLIBES)
40357f1050SThomas Veerman
41357f1050SThomas Veermantest: $(testname)$(EXEEXT)
42357f1050SThomas Veerman	./$(testname)$(EXEEXT) < $(srcdir)/test.input
43357f1050SThomas Veerman
44357f1050SThomas Veerman.cpp.o:
45*0a6a1f1dSLionel Sambuc	$(CXX) $(CXXFLAGS) -c -o $@ $(AM_CPPFLAGS) $(CPPFLAGS) $<
46