]> git.draconx.ca Git - gob-dx.git/blob - src/Makefile.am
Release 1.99.1
[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 = gob2
12
13 BUILT_SOURCES = parse.h parse.c lexer.c
14
15 gob2_SOURCES =  \
16         main.c          \
17         main.h          \
18         treefuncs.c     \
19         treefuncs.h     \
20         out.c           \
21         out.h           \
22         util.c          \
23         util.h          \
24         checks.c        \
25         checks.h        \
26         parse.y         \
27         lexer.l
28
29 gob2_LDADD = \
30         -lm \
31         $(GLIB_LIBS) \
32         @LEXLIB@
33
34 # we might want popt back in the future
35 #       @POPT_LIB@
36
37 CLEANFILES += $(BUILT_SOURCES) test-object.* test-object-private.h
38
39 EXTRA_DIST = $(BUILT_SOURCES) test.gob generate_treefuncs.pl treefuncs.def
40
41 parse.h parse.c: 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: test-object.c test-object.h
47         $(CC) -g -Wall `pkg-config --cflags gobject-2.0` -c test-object.c
48
49 test-object.c test-object.h: test.gob gob2
50         ./gob2 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: test-object.cc
55         g++ -g -Wall `pkg-config --cflags gobject-2.0` -c test-object.cc
56
57 test-object.cc: test.gob gob2
58         ./gob2 --for-cpp test.gob