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