Adding nasty hack to rules to generate cothreads.{o,lo}, to get dependencies right...
[platform/upstream/gstreamer.git] / gst / Makefile.am
1 # cheap trick to build . first...
2 SUBDIRS = . types meta elements
3
4 lib_LTLIBRARIES = libgst.la
5
6 if HAVE_CPU_I386
7 GSTARCH_SRCS = gstcpuid_i386.s
8 else
9 GSTARCH_SRCS = 
10 endif
11
12 EXTRA_libgst_la_SOURCES =       \
13         gstcpuid_i386.s
14
15 libgst_la_SOURCES =             \
16         cothreads.c             \
17         gst.c                   \
18         gstautoplug.c           \
19         gstbin.c                \
20         gstbuffer.c             \
21         gstbufferpool.c         \
22         gstcaps.c               \
23         gstclock.c              \
24         gstcpu.c                \
25         gstelement.c            \
26         gstelementfactory.c     \
27         gstextratypes.c         \
28         gstinfo.c               \
29         gstmeta.c               \
30         gstobject.c             \
31         gstpad.c                \
32         gstpipeline.c           \
33         gstplugin.c             \
34         gstprops.c              \
35         gstscheduler.c          \
36         gsttee.c                \
37         gstthread.c             \
38         gsttrace.c              \
39         gsttype.c               \
40         gstutils.c              \
41         gstxml.c                \
42         gstparse.c              \
43         $(GSTARCH_SRCS)
44
45 # the compiler shoots cothreads.c in the head at -O6
46 # FIXME: these manual rules break the dependency generation, so we have a
47 # nasty hack here.  
48 LTCOMPILE2=$(LTCOMPILE) -O2
49 COMPILE2=$(COMPILE) -O2
50 cothreads.lo: cothreads.c
51         @echo '$(LTCOMPILE2) -c $<'; \
52         $(LTCOMPILE2) -Wp,-MD,.deps/$(*F).pp -c $<
53         @-sed -e 's/^\([^:]*\)\.o[      ]*:/\1.lo \1.o :/' \
54           < .deps/$(*F).pp > .deps/$(*F).P; \
55         tr ' ' '\012' < .deps/$(*F).pp \
56           | sed -e 's/^\\$$//' -e '/^$$/ d' -e '/:$$/ d' -e 's/$$/ :/' \
57             >> .deps/$(*F).P; \
58         rm -f .deps/$(*F).pp
59 cothreads.o: cothreads.c
60         @echo '$(COMPILE2) -c $<'; \
61         $(COMPILE2) -Wp,-MD,.deps/$(*F).pp -c $<
62         @-sed -e 's/^\([^:]*\)\.o[      ]*:/\1.lo \1.o :/' \
63           < .deps/$(*F).pp > .deps/$(*F).P; \
64         tr ' ' '\012' < .deps/$(*F).pp \
65           | sed -e 's/^\\$$//' -e '/^$$/ d' -e '/:$$/ d' -e 's/$$/ :/' \
66             >> .deps/$(*F).P; \
67         rm -f .deps/$(*F).pp
68
69 libgstincludedir = $(includedir)/gst
70 libgstinclude_HEADERS =         \
71         cothreads.h             \
72         gst.h                   \
73         gstautoplug.h           \
74         gstbin.h                \
75         gstbuffer.h             \
76         gstbufferpool.h         \
77         gstcaps.h               \
78         gstclock.h              \
79         gstcpu.h                \
80         gstelement.h            \
81         gstextratypes.h         \
82         gstinfo.h               \
83         gstlog.h                \
84         gstmeta.h               \
85         gstobject.h             \
86         gstpad.h                \
87         gstpipeline.h           \
88         gstplugin.h             \
89         gstprops.h              \
90         gstscheduler.h          \
91         gsttee.h                \
92         gstthread.h             \
93         gsttrace.h              \
94         gsttype.h               \
95         gstutils.h              \
96         gstparse.h              \
97         gstxml.h
98
99 noinst_HEADERS =        \
100         gst_private.h   \
101         gstarch.h       \
102         gsti386.h       \
103         gstppc.h        \
104         gstpropsprivate.h
105
106 CFLAGS = $(LIBGST_CFLAGS)
107 LIBS = $(LIBGST_LIBS)
108 libgst_la_LDFLAGS = -version-info $(GSTREAMER_LIBVERSION)
109
110 EXTRA_DIST = ROADMAP