xref: /minix3/external/bsd/flex/dist/tests/test-multiple-scanners-r/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 Veermanbuilddir = @builddir@
26357f1050SThomas Veerman
27357f1050SThomas VeermanEXTRA_DIST = scanner-1.l scanner-2.l main.c
28357f1050SThomas VeermanCLEANFILES = scanner-1.c scanner-1.h $(testname)$(EXEEXT) OUTPUT\
29357f1050SThomas Veerman             $(OBJS) scanner-2.c scanner-2.h scanner-1.tables \
30357f1050SThomas Veerman             scanner-2.tables
31357f1050SThomas VeermanOBJS = scanner-1.o scanner-2.o main.o
32357f1050SThomas Veerman
33357f1050SThomas VeermanAM_CPPFLAGS = -I$(srcdir) -I$(top_srcdir) -I$(top_builddir) -I$(builddir)
34357f1050SThomas Veerman#LDFLAGS = $(top_srcdir)/libfl.a
35357f1050SThomas Veerman#YFLAGS = --defines --output=parser.c
36357f1050SThomas Veerman
37357f1050SThomas Veermantestname = test-multiple-scanners-r
38357f1050SThomas Veerman
39357f1050SThomas Veermanscanner-1.c: $(srcdir)/scanner-1.l
40357f1050SThomas Veerman	$(FLEX) $(LFLAGS) --header=scanner-1.h $<
41357f1050SThomas Veerman
42357f1050SThomas Veermanscanner-2.c: $(srcdir)/scanner-2.l
43357f1050SThomas Veerman	$(FLEX) $(LFLAGS) --header=scanner-2.h $<
44357f1050SThomas Veerman
45357f1050SThomas Veerman$(testname)$(EXEEXT): $(OBJS)
46*0a6a1f1dSLionel Sambuc	$(CC) $(CFLAGS) -o $@ $(LDFLAGS) $(OBJS) $(LOADLIBES)
47357f1050SThomas Veerman
48357f1050SThomas Veermantest: $(testname)$(EXEEXT)
49357f1050SThomas Veerman	./$(testname)$(EXEEXT)
50357f1050SThomas Veerman
51357f1050SThomas Veerman.c.o:
52357f1050SThomas Veerman	$(CC) -c -o $@ $(AM_CPPFLAGS) $(CPPFLAGS) $(CFLAGS) $<
53357f1050SThomas Veerman
54357f1050SThomas Veermanmain.o: scanner-1.h scanner-2.h
55357f1050SThomas Veermanscanner-1.h: scanner-1.c
56357f1050SThomas Veermanscanner-2.h: scanner-2.c
57