]> git.draconx.ca Git - gob-dx.git/blob - src/Makefile.am
Release 1.0.2
[gob-dx.git] / src / Makefile.am
1 #YACCFLAGS += -d -t
2 YFLAGS += -d -t
3 SUBDIRS =
4
5 CFLAGS += -Wall -Wpointer-arith -Wmissing-prototypes -Wmissing-declarations
6
7 INCLUDES = @GLIB_CFLAGS@ -I$(includedir)
8
9 bin_PROGRAMS = @DOINSTGOB@
10 noinst_PROGRAMS = @NOINSTGOB@
11 EXTRA_PROGRAMS = gob
12
13 gob_SOURCES =   \
14         main.c          \
15         main.h          \
16         treefuncs.c     \
17         treefuncs.h     \
18         out.c           \
19         out.h           \
20         util.c          \
21         util.h          \
22         checks.c        \
23         checks.h        \
24         parse.y         \
25         lexer.l
26
27 gob_LDADD = \
28         -lm \
29         $(GLIB_LIBS) \
30         @LEXLIB@
31
32 # we might want popt back in the future
33 #       @POPT_LIB@
34
35 BUILT_SOURCES = parse.h parse.c lexer.c
36
37 CLEANFILES += $(BUILT_SOURCES) gtk-weird-button.* gtk-weird-button-private.h
38
39 EXTRA_DIST = test.gob generate_treefuncs.pl treefuncs.def
40
41 parse.h: parse.y
42         $(YACC) $(YFLAGS) $<
43         test -f y.tab.c && mv -f y.tab.c parse.c
44         test -f y.tab.h && mv -f y.tab.h parse.h
45
46 test: gtk-weird-button.c gtk-weird-button.h
47         $(CC) -g -Wall `gtk-config --cflags` -c gtk-weird-button.c
48
49 gtk-weird-button.c gtk-weird-button.h: test.gob gob
50         ./gob test.gob
51
52 # can't depend on the header file as that would break the above rule
53 # since it's just for testing, who cares
54 testcpp: gtk-weird-button.cc
55         g++ -g -Wall `gtk-config --cflags` -c gtk-weird-button.cc
56
57 gtk-weird-button.cc: test.gob gob
58         ./gob --for-cpp test.gob