1 # This file is part of flex.
3 # Redistribution and use in source and binary forms, with or without
4 # modification, are permitted provided that the following conditions
7 # 1. Redistributions of source code must retain the above copyright
8 # notice, this list of conditions and the following disclaimer.
9 # 2. Redistributions in binary form must reproduce the above copyright
10 # notice, this list of conditions and the following disclaimer in the
11 # documentation and/or other materials provided with the distribution.
13 # Neither the name of the University nor the names of its contributors
14 # may be used to endorse or promote products derived from this software
15 # without specific prior written permission.
17 # THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
18 # IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
19 # WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
24 # Possible values for DEFS:
26 # By default, flex generates 8-bit scanners when using table compression,
27 # and 7-bit scanners when using uncompressed tables (-f or -F options).
28 # For flex to always generate 8-bit scanners, add "-DDEFAULT_CSIZE=256"
31 # For Vax/VMS, add "-DVMS" to DEFS.
33 # For MS-DOS, add "-DMS_DOS" to DEFS. See the directory MISC/MSDOS for
37 ACLOCAL_AMFLAGS = -I m4
70 LDADD = lib/libcompat.la
76 libfl_la_LDFLAGS = -no-undefined -version-info @SHARED_VERSION_INFO@
78 libfl_pic_la_SOURCES = \
82 libfl_pic_la_LDFLAGS = -no-undefined -version-info @SHARED_VERSION_INFO@
125 localedir = $(datadir)/locale
126 AM_CPPFLAGS = -DLOCALEDIR=\"$(localedir)\" -I$(top_srcdir)/intl
127 LIBS = @LIBINTL@ @LIBS@
129 skel.c: flex.skl mkskel.sh flexint.h tables_shared.h
130 sed 's/m4_/m4postproc_/g; s/m4preproc_/m4_/g' $(srcdir)/flex.skl | $(m4) -P -DFLEX_MAJOR_VERSION=`echo $(VERSION)|cut -f 1 -d .` -DFLEX_MINOR_VERSION=`echo $(VERSION)|cut -f 2 -d .` -DFLEX_SUBMINOR_VERSION=`echo $(VERSION)|cut -f 3 -d .` | sed 's/m4postproc_/m4_/g' | $(SHELL) $(srcdir)/mkskel.sh >skel.c
132 # Explicitly describe dependencies.
133 # You can recreate this with `gcc -I. -MM *.c'
134 buf.o: buf.c flexdef.h flexint.h
135 ccl.o: ccl.c flexdef.h flexint.h
136 dfa.o: dfa.c flexdef.h flexint.h tables.h tables_shared.h
137 ecs.o: ecs.c flexdef.h flexint.h
138 scanflags.o: scanflags.c flexdef.h flexint.h
139 gen.o: gen.c flexdef.h flexint.h tables.h tables_shared.h
141 libyywrap.o: libyywrap.c
142 main.o: main.c flexdef.h flexint.h version.h options.h scanopt.h \
143 tables.h tables_shared.h
144 misc.o: misc.c flexdef.h flexint.h tables.h tables_shared.h
145 nfa.o: nfa.c flexdef.h flexint.h
146 options.o: options.c options.h scanopt.h flexdef.h flexint.h
147 parse.o: parse.c flexdef.h flexint.h tables.h tables_shared.h
148 scan.o: scan.c flexdef.h flexint.h parse.h
149 scanopt.o: scanopt.c flexdef.h flexint.h scanopt.h
150 skel.o: skel.c flexdef.h flexint.h
151 sym.o: sym.c flexdef.h flexint.h
152 tables.o: tables.c flexdef.h flexint.h tables.h tables_shared.h
153 tables_shared.o: tables_shared.c flexdef.h flexint.h tables.h \
155 tblcmp.o: tblcmp.c flexdef.h flexint.h
156 yylex.o: yylex.c flexdef.h flexint.h parse.h
157 filter.o: filter.c flexdef.h flexint.h
159 # Create the ChangeLog, but only if we're inside a git working directory
161 ChangeLog: $(srcdir)/tools/git2cl
162 if [ -d $(srcdir)/.git ] ; then \
163 $(srcdir)/tools/git2cl > $@ \
166 # Run GNU indent on sources. Don't run this unless all the sources compile cleanly.
169 # 1. Check for .indent.pro, otherwise indent will use unknown
170 # settings, or worse, the GNU defaults.)
171 # 2. Check that this is GNU indent.
172 # 3. Make sure to process only the NON-generated .c and .h files.
173 # 4. Run indent twice per file. The first time is a test.
174 # Otherwise, indent overwrites your file even if it fails!
202 if [ -f .indent.pro ] ; then \
203 for f in $(indentfiles);\
205 echo indenting $$f ;\
206 $(indent) < $$f >/dev/null && indent $$f || echo $$f FAILED to indent ;\
211 cd $(DESTDIR)$(bindir) && \
212 $(LN_S) -f flex$(EXEEXT) flex++$(EXEEXT)
214 .PHONY: ChangeLog tags indent