configure: Modernize autotools setup a bit
[platform/upstream/gstreamer.git] / gst / rtsp-server / Makefile.am
1 public_headers = \
2                 rtsp-auth.h \
3                 rtsp-params.h \
4                 rtsp-sdp.h \
5                 rtsp-media.h \
6                 rtsp-media-factory.h \
7                 rtsp-media-factory-uri.h \
8                 rtsp-media-mapping.h \
9                 rtsp-session.h \
10                 rtsp-session-pool.h \
11                 rtsp-client.h \
12                 rtsp-server.h
13
14 c_sources = \
15         rtsp-auth.c \
16         rtsp-params.c \
17         rtsp-sdp.c \
18         rtsp-media.c \
19         rtsp-media-factory.c \
20         rtsp-media-factory-uri.c \
21         rtsp-media-mapping.c \
22         rtsp-session.c \
23         rtsp-session-pool.c \
24         rtsp-client.c \
25         rtsp-server.c
26
27 noinst_HEADERS = 
28
29 lib_LTLIBRARIES = \
30         libgstrtspserver-@GST_API_VERSION@.la
31
32 libgstrtspserver_@GST_API_VERSION@_la_SOURCES = \
33     $(c_sources)
34
35 libgstrtspserver_@GST_API_VERSION@_la_CFLAGS = $(GST_PLUGINS_BASE_CFLAGS) $(GST_CFLAGS)
36 libgstrtspserver_@GST_API_VERSION@_la_LDFLAGS = $(GST_LIB_LDFLAGS) $(GST_ALL_LDFLAGS) $(GST_LT_LDFLAGS)
37 libgstrtspserver_@GST_API_VERSION@_la_LIBADD = \
38         $(GST_PLUGINS_BASE_LIBS) $(GST_BASE_LIBS) \
39     -lgstrtp-@GST_API_VERSION@ -lgstrtsp-@GST_API_VERSION@ \
40             -lgstsdp-@GST_API_VERSION@ \
41             -lgstapp-@GST_API_VERSION@ \
42             $(GST_LIBS) $(LIBM)
43 libgstrtspserver_@GST_API_VERSION@_la_LIBTOOLFLAGS = --tag=disable-static
44
45 libgstrtspserver_@GST_API_VERSION@includedir = $(includedir)/gstreamer-@GST_API_VERSION@/gst/rtsp-server
46 libgstrtspserver_@GST_API_VERSION@include_HEADERS = $(public_headers)
47
48 CLEANFILES =
49
50 if HAVE_INTROSPECTION
51 BUILT_GIRSOURCES = GstRtspServer-@GST_API_VERSION@.gir
52
53 gir_headers=$(patsubst %,$(srcdir)/%, $(libgstrtspserver_@GST_API_VERSION@include_HEADERS))
54 gir_sources=$(patsubst %,$(srcdir)/%, $(libgstrtspserver_@GST_API_VERSION@_la_SOURCES))
55 gir_cincludes=$(patsubst %,--c-include='gst/rtsp-server/%',$(libgstrtspinclude_HEADERS))
56
57 GstRtspServer-@GST_API_VERSION@.gir: $(INTROSPECTION_SCANNER) libgstrtspserver-@GST_API_VERSION@.la
58         $(AM_V_GEN)PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" \
59                 $(INTROSPECTION_SCANNER) -v --namespace GstRtspServer \
60                 --nsversion=@GST_API_VERSION@ \
61                 --strip-prefix=Gst \
62                 -I$(top_srcdir) \
63                 -I$(top_builddir) \
64                 -DIN_GOBJECT_INTROSPECTION=1 \
65                 --c-include='gst/gst.h' \
66                 --add-include-path=`$(PKG_CONFIG) --variable=girdir gstreamer-@GST_API_VERSION@` \
67                 --add-include-path=`$(PKG_CONFIG) --variable=girdir gstreamer-rtsp-@GST_API_VERSION@` \
68                 --add-include-path=`$(PKG_CONFIG) --variable=girdir gstreamer-sdp-@GST_API_VERSION@` \
69                 --library=libgstrtspserver-@GST_API_VERSION@.la \
70                 --include=Gst-@GST_API_VERSION@ \
71                 --include=GstRtsp-@GST_API_VERSION@ \
72                 --libtool="$(top_builddir)/libtool" \
73                 --pkg gstreamer-@GST_API_VERSION@ \
74                 --pkg gstreamer-rtsp-@GST_API_VERSION@ \
75                 --pkg-export gstreamer-rtsp-server-@GST_API_VERSION@ \
76                 --output $@ \
77                 $(gir_headers) \
78                 $(gir_sources)
79
80 # INTROSPECTION_GIRDIR/INTROSPECTION_TYPELIBDIR aren't the right place to
81 # install anything - we need to install inside our prefix.
82 girdir = $(datadir)/gir-1.0
83 gir_DATA = $(BUILT_GIRSOURCES)
84
85 typelibsdir = $(libdir)/girepository-1.0/
86
87 typelibs_DATA = $(BUILT_GIRSOURCES:.gir=.typelib)
88
89 %.typelib: %.gir $(INTROSPECTION_COMPILER)
90         $(AM_V_GEN)PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" \
91         $(INTROSPECTION_COMPILER) \
92         --includedir=$(srcdir) \
93         --includedir=$(builddir) \
94         --includedir=`$(PKG_CONFIG) --variable=girdir gstreamer-@GST_API_VERSION@` \
95         --includedir=`$(PKG_CONFIG) --variable=girdir gstreamer-rtsp-@GST_API_VERSION@` \
96         --includedir=`$(PKG_CONFIG) --variable=girdir gstreamer-sdp-@GST_API_VERSION@` \
97         $(INTROSPECTION_COMPILER_OPTS) $< -o $(@F)
98
99 CLEANFILES += $(BUILT_GIRSOURCES) $(typelibs_DATA)
100 endif