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