comparison examples/dynamic/Makefile.am @ 398:674717c2c3ee

Use libtool to build .so modules.
author john.cylee@gmail.com
date Fri, 12 Jun 2009 11:23:59 +0800
parents 02e457d374f5
children 31b6633e3538
comparison
equal deleted inserted replaced
397:55f38c2cdb8f 398:674717c2c3ee
1 include $(top_srcdir)/config.mk 1 include $(top_srcdir)/config.mk
2 2
3 #SUFFIXES=.svg .mbso 3 #SUFFIXES=.svg .mbso
4 4
5 noinst_PROGRAMS = dynamic hello text button.so mytext.so scene.so 5 noinst_PROGRAMS = dynamic hello text
6 noinst_LTLIBRARIES = button.la mytext.la scene.la
6 EXTRA_DIST = menu.svg button.svg 7 EXTRA_DIST = menu.svg button.svg
7 8
8 dynamic_SOURCES = main.c 9 dynamic_SOURCES = main.c
9 nodist_dynamic_SOURCES = 10 nodist_dynamic_SOURCES =
10 CPPFLAGS = @pangocairo_CFLAGS@ $(INCLUDES) 11 CPPFLAGS = @pangocairo_CFLAGS@ $(INCLUDES)
11 dynamic_LDFLAGS = @pangocairo_LIBS@ 12 dynamic_LDFLAGS = @pangocairo_LIBS@
12 dynamic_LDADD = $(top_builddir)/src/libmbfly.la 13 dynamic_LDADD = $(top_builddir)/src/libmbfly.la
13 BUILT_SOURCES = 14 BUILT_SOURCES =
14 CLEANFILES = menu.c menu.h menu.mb \ 15 CLEANFILES = menu.c menu.h menu.mb \
15 button.c button.h button.mb \ 16 button.c button.h button.mb \
16 scene.c scene.h scene.mb 17 scene.c scene.h scene.mbn
17 18
18 19
19 hello_SOURCES = hello.c 20 hello_SOURCES = hello.c
20 hello_LDFLAGS = @pangocairo_LIBS@ 21 hello_LDFLAGS = @pangocairo_LIBS@
21 hello_LDADD = $(top_builddir)/src/libmbfly.la 22 hello_LDADD = $(top_builddir)/src/libmbfly.la
23 24
24 text_SOURCES = text.c 25 text_SOURCES = text.c
25 text_LDFLAGS = @pangocairo_LIBS@ 26 text_LDFLAGS = @pangocairo_LIBS@
26 text_LDADD = $(top_builddir)/src/libmbfly.la 27 text_LDADD = $(top_builddir)/src/libmbfly.la
27 28
28 button.so: button.o
29 $(CC) $(CFLAGS) -I ../../include -shared -o $@ $<
30 29
31 button.o: button.c button.h 30 button_la_SOURCES = button.c
31 button_la_LDFLAGS = -module -avoid-version -rpath /nowhere -shared
32 32
33 button.c: button.mb 33
34 mytext_la_SOURCES = mytext.c
35 mytext_la_LDFLAGS = -module -avoid-version -rpath /nowhere -shared
36
37
38 scene_la_SOURCES = mytext.c
39 scene_la_LDFLAGS = -module -avoid-version -rpath /nowhere -shared
40
41
42 button.c: button.mb button.h
34 m4 -I $(top_srcdir)/tools mb_c_source.m4 $< > $@ 43 m4 -I $(top_srcdir)/tools mb_c_source.m4 $< > $@
35 44
36 button.h: button.mb 45 button.h: button.mb
37 m4 -I $(top_srcdir)/tools mb_c_header.m4 $< > $@ 46 m4 -I $(top_srcdir)/tools mb_c_header.m4 $< > $@
38 47
39 button.mb: button.svg 48 button.mb: button.svg
40 $(top_srcdir)/tools/svg2code.py $< $@ 49 $(top_srcdir)/tools/svg2code.py $< $@
41 50
42 mytext.so: mytext.o 51 mytext.c: mytext.mb mytext.h
43 $(CC) $(CFLAGS) -I ../../include -shared -o $@ $<
44
45 mytext.o: mytext.c mytext.h
46
47 mytext.c: mytext.mb
48 m4 -I $(top_srcdir)/tools mb_c_source.m4 $< > $@ 52 m4 -I $(top_srcdir)/tools mb_c_source.m4 $< > $@
49 53
50 mytext.h: mytext.mb 54 mytext.h: mytext.mb
51 m4 -I $(top_srcdir)/tools mb_c_header.m4 $< > $@ 55 m4 -I $(top_srcdir)/tools mb_c_header.m4 $< > $@
52 56
53 mytext.mb: mytext.svg 57 mytext.mb: mytext.svg
54 $(top_srcdir)/tools/svg2code.py $< $@ 58 $(top_srcdir)/tools/svg2code.py $< $@
55 59
56 scene.so: scene.o 60 scene.c: scene.mb scene.h
57 $(CC) $(CFLAGS) -I ../../include -shared -o $@ $<
58
59 scene.o: scene.c scene.h
60
61 scene.c: scene.mb
62 m4 -I $(top_srcdir)/tools mb_c_source.m4 $< > $@ 61 m4 -I $(top_srcdir)/tools mb_c_source.m4 $< > $@
63 62
64 scene.h: scene.mb 63 scene.h: scene.mb
65 m4 -I $(top_srcdir)/tools mb_c_header.m4 $< > $@ 64 m4 -I $(top_srcdir)/tools mb_c_header.m4 $< > $@
66 65