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 VeermanFLEX = $(top_builddir)/flex
23357f1050SThomas Veerman
24357f1050SThomas Veermanbuilddir = @builddir@
25357f1050SThomas Veerman
26357f1050SThomas VeermanEXTRA_DIST = scanner.l test.input
27357f1050SThomas VeermanCLEANFILES = scanner.c scanner.h $(testname)$(EXEEXT) OUTPUT $(OBJS)
28357f1050SThomas VeermanOBJS = scanner.o
29357f1050SThomas Veerman
30357f1050SThomas VeermanAM_CPPFLAGS = -I$(srcdir) -I$(builddir) -I$(top_srcdir) -I$(top_builddir)
31357f1050SThomas Veerman#LDFLAGS = $(top_srcdir)/libfl.a
32357f1050SThomas Veerman#LFLAGS = --header="scanner.h"
33357f1050SThomas Veerman#YFLAGS = --defines --output=parser.c
34357f1050SThomas Veerman
35357f1050SThomas Veermantestname = test-rescan-nr
36357f1050SThomas Veerman
37357f1050SThomas Veermanscanner.c: $(srcdir)/scanner.l
38357f1050SThomas Veerman	$(FLEX) $(LFLAGS) $<
39357f1050SThomas Veerman
40357f1050SThomas Veerman$(testname)$(EXEEXT): $(OBJS)
41*0a6a1f1dSLionel Sambuc	$(CC) $(CFLAGS) -o $@ $(LDFLAGS) $(OBJS) $(LOADLIBES)
42357f1050SThomas Veerman
43357f1050SThomas Veermantest: $(testname)$(EXEEXT)
44357f1050SThomas Veerman	./$(testname)$(EXEEXT) $(srcdir)/test.input
45357f1050SThomas Veerman
46357f1050SThomas Veerman.c.o:
47357f1050SThomas Veerman	$(CC) -c -o $@ $(AM_CPPFLAGS) $(CPPFLAGS) $(CFLAGS) $<
48