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