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