1 ## This is a -*- Makefile -*-
2 ## Process this file with automake to create Makefile.in
4 SUBDIRS = Scripts Widgets
6 moduledir = @FVWM_MODULEDIR@
8 module_PROGRAMS = FvwmScript
10 FvwmScript_SOURCES = FvwmScript.c Instructions.c libyywrap.c \
11 types.h scanner.c script.c script.h
12 FvwmScript_DEPENDENCIES = $(top_builddir)/libs/libfvwm.a Widgets/libWidgets.a
16 man_MANS = FvwmScript.1
17 EXTRA_DIST = $(man_MANS) scanner.l script.y TODO
19 LDADD = Widgets/libWidgets.a -L$(top_builddir)/libs -lfvwm $(Xft_LIBS) \
20 $(X_LIBS) $(xpm_LIBS) $(Xinerama_LIBS) $(X_PRE_LIBS) -lXext -lX11 \
21 $(X_EXTRA_LIBS) -lm $(Xrender_LIBS) $(Xcursor_LIBS) $(iconv_LIBS) \
22 $(Bidi_LIBS) $(png_LIBS) $(rsvg_LIBS) $(intl_LIBS)
24 INCLUDES = -I$(top_srcdir) $(xpm_CFLAGS) $(Xft_CFLAGS) $(X_CFLAGS) \
25 $(Xrender_CFLAGS) $(iconv_CFLAGS) $(Bidi_CFLAGS) $(png_CFLAGS)
27 # Need this to get datadir into FvwmScript.c:
28 AM_CFLAGS = -DFVWM_DATADIR=\"$(FVWM_DATADIR)\" -DLOCALEDIR=\"$(LOCALEDIR)\"
32 # We don't autoconfigure lex/yacc, since these tools only needed for
33 # developers that want to regenerate the FvwmScript syntax.
34 # To override the default values use: make YACC="bison -y" syntax
39 rm -f lex.yy.c y.tab.c y.tab.h script.tab.c script.tab.h || true
40 if $(LEX) --nounput --help 2>/dev/null > /dev/null; then \
41 $(LEX) $(AM_LFLAGS) $(LFLAGS) --nounput scanner.l; \
43 $(LEX) $(AM_LFLAGS) $(LFLAGS) scanner.l; \
44 fi && mv lex.yy.c scanner.c
46 @# detect and prefer bison; bison without -y uses file.tab.[ch] names
47 YACC=$(YACC); if which bison >/dev/null 2>&1; then YACC="bison -y"; fi; \
48 $$YACC $(AM_YFLAGS) $(YFLAGS) script.y && mv *.tab.c script.c
50 @# don't touch unmodified header to reduce rebuilds
51 if test -f y.tab.h -o -f script.tab.h; then \
52 if cmp -s *.tab.h script.h; then \
55 mv *.tab.h script.h; \