Makefile.am 3.49 KB
Newer Older
1 2 3 4 5 6 7
#
# Makefile.am for the Nice Glib ICE library
#
# (C) 2006, 2007 Collabora Ltd.
# (C) 2006, 2007 Nokia Corporation. All rights reserved.
#
# Licensed under MPL 1.1/LGPL 2.1. See file COPYING.
Dafydd Harries's avatar
Dafydd Harries committed
8

9 10
include $(top_srcdir)/common.mk

11
AM_CFLAGS = \
12
	-DG_LOG_DOMAIN=\"libnice\" \
13
	$(LIBNICE_CFLAGS) \
14
	$(GLIB_CFLAGS) \
Youness Alaoui's avatar
Youness Alaoui committed
15
	$(GUPNP_CFLAGS) \
16
	-I $(top_srcdir) \
17
	-I $(top_srcdir)/random \
18
	-I $(top_srcdir)/socket \
19
	-I $(top_srcdir)/stun
Dafydd Harries's avatar
Dafydd Harries committed
20

21 22 23
if WINDOWS
  AM_CFLAGS += -DWINVER=0x0501 # _WIN32_WINNT_WINXP
endif
24

25 26 27 28 29 30
BUILT_SOURCES = \
	agent-enum-types.h \
	agent-enum-types.c

CLEANFILES += $(BUILT_SOURCES)

31
noinst_LTLIBRARIES = libagent.la
Dafydd Harries's avatar
Dafydd Harries committed
32

33 34 35 36 37 38 39 40 41
pkginclude_HEADERS = \
	agent.h \
	candidate.h \
	debug.h \
	address.h \
	interfaces.h \
	pseudotcp.h \
	$(NULL)

42
libagent_la_SOURCES = \
43 44
	address.h \
	address.c \
45 46
	debug.h \
	debug.c \
Dafydd Harries's avatar
Dafydd Harries committed
47 48
	candidate.h \
	candidate.c \
49 50
	component.h \
	component.c \
51
	agent.h \
52
	agent-priv.h \
53
	agent.c \
54 55
	stream.h \
	stream.c \
56 57 58 59
	conncheck.c \
	conncheck.h \
	discovery.c \
	discovery.h \
Youness Alaoui's avatar
Youness Alaoui committed
60 61
	interfaces.c \
	interfaces.h \
62 63
	pseudotcp.h \
	pseudotcp.c \
64 65 66 67 68 69
	iostream.h \
	iostream.c \
	inputstream.h \
	inputstream.c \
	outputstream.h \
	outputstream.c \
70
	$(BUILT_SOURCES)
Dafydd Harries's avatar
Dafydd Harries committed
71

72
agent-enum-types.h: $(pkginclude_HEADERS) Makefile
73 74 75 76 77
	$(AM_V_GEN)$(GLIB_MKENUMS) \
		--fhead "#ifndef __AGENT_ENUM_TYPES_H__\n#define __AGENT_ENUM_TYPES_H__ 1\n\n#include <glib-object.h>\n\nG_BEGIN_DECLS\n" \
		--fprod "/* enumerations from \"@filename@\" */\n" \
		--vhead "GType @enum_name@_get_type (void) G_GNUC_CONST;\n#define NICE_TYPE_@ENUMSHORT@ (@enum_name@_get_type())\n" \
		--ftail "G_END_DECLS\n\n#endif /* !AGENT_ENUM_TYPES_H */" \
78
		$(addprefix $(srcdir)/,$(pkginclude_HEADERS)) > $@
79

80
agent-enum-types.c: $(pkginclude_HEADERS) Makefile agent-enum-types.h
81
	$(AM_V_GEN)$(GLIB_MKENUMS) \
82
		--fhead "#include <config.h>\n#include <glib-object.h>\n#include \"agent.h\"\n#include \"pseudotcp.h\"\n#include \"agent-enum-types.h\"" \
83 84 85 86
		--fprod "\n/* enumerations from \"@filename@\" */" \
		--vhead "GType\n@enum_name@_get_type (void)\n{\n  static GType type = 0;\n  if (!type) {\n    static const G@Type@Value values[] = {" \
		--vprod "      { @VALUENAME@, \"@VALUENAME@\", \"@valuenick@\" }," \
		--vtail "      { 0, NULL, NULL }\n    };\n    type = g_@type@_register_static (\"@EnumName@\", values);\n  }\n  return type;\n}\n\n" \
87
		$(addprefix $(srcdir)/,$(pkginclude_HEADERS)) > $@
88

Dafydd Harries's avatar
Dafydd Harries committed
89
libagent_la_LIBADD = \
90
	$(top_builddir)/random/libnice-random.la \
91
	$(top_builddir)/socket/libsocket.la \
92 93 94 95
	$(top_builddir)/stun/libstun.la \
	$(GLIB_LIBS) \
	$(GUPNP_LIBS) \
	$(NULL)
96
libagent_la_DEPENDENCIES = \
97
	$(top_builddir)/random/libnice-random.la \
98 99
	$(top_builddir)/socket/libsocket.la \
	$(top_builddir)/stun/libstun.la
100

101
if WINDOWS
102
  libagent_la_LIBADD += -liphlpapi -lws2_32
103
endif
104 105 106 107 108 109 110 111 112 113 114 115 116 117

#
# GObject introspection
#
# We need --accept-unprefixed because of PseudoTcp and TurnServer.
#
-include $(INTROSPECTION_MAKEFILE)
INTROSPECTION_GIRS =
INTROSPECTION_SCANNER_ARGS = --add-include-path=$(srcdir) --warn-all --accept-unprefixed
INTROSPECTION_COMPILER_ARGS = --includedir=$(srcdir)

if HAVE_INTROSPECTION
introspection_sources = $(pkginclude_HEADERS)

118 119 120 121 122 123 124
Nice-0.1.gir: libagent.la
Nice_0_1_gir_INCLUDES = GObject-2.0 Gio-2.0
Nice_0_1_gir_EXPORT_PACKAGES = nice
Nice_0_1_gir_CFLAGS = $(AM_CFLAGS)
Nice_0_1_gir_LIBS = libagent.la
Nice_0_1_gir_FILES = $(introspection_sources)
INTROSPECTION_GIRS += Nice-0.1.gir
125 126 127 128 129 130 131 132 133

girdir = $(datadir)/gir-1.0
gir_DATA = $(INTROSPECTION_GIRS)

typelibdir = $(libdir)/girepository-1.0
typelib_DATA = $(INTROSPECTION_GIRS:.gir=.typelib)

CLEANFILES += $(gir_DATA) $(typelib_DATA)
endif