1
lib_LTLIBRARIES = libdmapsharing.la
2
3
BUILT_SOURCES = dmap-marshal.c dmap-marshal.h dmap-enums.c dmap-enums.h
4
5
libdmapsharing_la_SOURCES = \
6
	$(BUILT_SOURCES) \
7
	daap-record.c \
8
	daap-share.c \
9
	dacp-share.c \
10
	dacp-player.c \
11
	dmap-connection.c \
12
	dmap-container-db.c \
13
	dmap-container-record.c \
14
	dmap-db.c \
15
	dmap-md5.c \
16
	dmap-record.c \
17
	dmap-record-factory.c \
18
	dmap-share.c \
19
	dmap-structure.c \
20
	dpap-record.c \
21
	dpap-share.c
22
23
if USE_HOWL
24
libdmapsharing_la_SOURCES += \
25
	dmap-mdns-browser-howl.c
26
else
27
if USE_DNS_SD
28
libdmapsharing_la_SOURCES += \
29
	dmap-mdns-browser-dnssd.c \
30
	dmap-mdns-publisher-dnssd.c
31
else
32
libdmapsharing_la_SOURCES += \
33
	dmap-mdns-avahi.c \
34
	dmap-mdns-browser-avahi.c \
35
	dmap-mdns-publisher-avahi.c
36
endif
37
endif
38
39
if USE_GSTREAMERAPP
40
libdmapsharing_la_SOURCES += \
41
	g-gst-input-stream.c \
42
	g-gst-mp3-input-stream.c \
43
	g-gst-wav-input-stream.c \
44
	gst-util.c
45
endif
46
47
libdmapsharing_la_CFLAGS = \
48
	-DG_LOG_DOMAIN=\"libdmapsharing\" \
49
	-I$(top_srcdir) \
50
	$(SOUP_CFLAGS) \
51
	$(GSTREAMERAPP_CFLAGS) \
52
	$(MDNS_CFLAGS)
53
54
libdmapsharing_la_LDFLAGS = \
55
	-version-info @SO_VERSION@ \
56
	$(GLIB_LIBS) \
57
	$(GTHREAD_LIBS) \
58
	$(GOBJECT_LIBS) \
59
	$(MDNS_LIBS) \
60
	$(GSTREAMERAPP_LIBS) \
61
	$(SOUP_LIBS)
62
63
libdmapsharingincludedir = \
64
	$(includedir)/libdmapsharing-@LIBDMAPSHARING_MAJORMINOR@/libdmapsharing
65
66
libdmapsharinginclude_HEADERS = \
67
	daap-record.h \
68
	daap-share.h \
69
	dacp-share.h \
70
	dacp-player.h \
71
	dmap.h \
72
	dmap-connection.h \
73
	dmap-container-db.h \
74
	dmap-container-record.h \
75
	dmap-db.h \
76
	dmap-md5.h \
77
	dmap-mdns-browser.h \
78
	dmap-mdns-publisher.h \
79
	dmap-record.h \
80
	dmap-record-factory.h \
81
	dmap-share.h \
82
	dpap-record.h \
83
	dpap-share.h
84
85
noinst_HEADERS = \
86
	dmap-enums.h \
87
	dmap-marshal.h \
88
	dmap-config.h \
89
	dmap-mdns-avahi.h \
90
	dmap-structure.h \
91
	dmap-utils.h \
92
	g-gst-input-stream.h \
93
	g-gst-mp3-input-stream.h \
94
	g-gst-wav-input-stream.h \
95
	gst-util.h
96
97
dmap-marshal.c: dmap-marshal.list
98
	@glib-genmarshal --prefix=dmap_marshal $(srcdir)/dmap-marshal.list --header --body > dmap-marshal.c
99
100
dmap-marshal.h: dmap-marshal.list
101
	@glib-genmarshal --prefix=dmap_marshal $(srcdir)/dmap-marshal.list --header > dmap-marshal.h
102
	
103
dmap-enums.h: $(libdmapsharinginclude_HEADERS) Makefile
104
	@glib-mkenums \
105
			--fhead "/* Automatically generated by glib-mkenums */\n\n#ifndef DMAP_ENUMS_H\n#define DMAP_ENUMS_H\n\n#include <glib-object.h>\n\nG_BEGIN_DECLS\n\n" \
106
			--fprod "\n/* enumerations from \"@filename@\" */\n" \
107
			--vhead "GType @enum_name@_get_type (void) G_GNUC_CONST;\n#define TYPE_@ENUMNAME@ (@enum_name@_get_type())\n" \
108
			--ftail "G_END_DECLS\n\n#endif /* !DMAP_ENUMS_H */" $(addprefix $(srcdir)/,$(libdmapsharinginclude_HEADERS)) > $@.tmp \
109
	&& sed -e "s/d_map/dmap/" -e "s/D_MAP/DMAP/" -e "s/d_acp/dacp/" -e "s/D_ACP/DACP/" $@.tmp > $@ \
110
	&& rm -f $@.tmp
111
112
dmap-enums.c: $(libdmapsharinginclude_headers) Makefile dmap-enums.h
113
	@glib-mkenums \
114
			--fhead "/* Automatically generated by glib-mkenums */\n\n#include \"dacp-share.h\"\n#include \"dacp-player.h\"\n#include \"dmap-mdns-publisher.h\"\n#include \"dmap-mdns-browser.h\"\n#include \"dmap-connection.h\"\n#include \"dmap-enums.h\"" \
115
			--fprod "\n/* enumerations from \"@filename@\" */" \
116
			--vhead "GType\n@enum_name@_get_type (void)\n{\n  static GType etype = 0;\n  if (etype == 0) {\n    static const G@Type@Value values[] = {" \
117
			--vprod "      { @VALUENAME@, \"@VALUENAME@\", \"@valuenick@\" }," \
118
			--vtail "      { 0, NULL, NULL }\n    };\n    etype = g_@type@_register_static (\"@EnumName@\", values);\n  }\n  return etype;\n}\n" \
119
		$(addprefix $(srcdir)/,$(libdmapsharinginclude_HEADERS)) > $@.tmp \
120
	&& sed -e "s/d_map/dmap/" -e "s/D_MAP/DMAP/" -e "s/d_acp/dacp/" -e "s/D_ACP/DACP/" $@.tmp > $@ \
121
	&& rm -f $@.tmp
122
123
CLEANFILES = $(BUILT_SOURCES)
124
125
EXTRA_DIST = dmap-marshal.list