2 # Makefile.am for the Nice Glib ICE library
4 # (C) 2006, 2007 Collabora Ltd.
5 # (C) 2006, 2007 Nokia Corporation. All rights reserved.
7 # Licensed under MPL 1.1/LGPL 2.1. See file COPYING.
9 include $(top_srcdir)/common.mk
12 -DG_LOG_DOMAIN=\"libnice\" \
17 -I $(top_srcdir)/random \
18 -I $(top_srcdir)/socket \
22 AM_CFLAGS += -DWINVER=0x0501 # _WIN32_WINNT_WINXP
29 CLEANFILES += $(BUILT_SOURCES)
31 noinst_LTLIBRARIES = libagent.la
33 pkginclude_HEADERS = \
42 libagent_la_SOURCES = \
72 agent-enum-types.h: $(pkginclude_HEADERS) Makefile
73 $(AM_V_GEN)$(GLIB_MKENUMS) \
74 --fhead "#ifndef __AGENT_ENUM_TYPES_H__\n#define __AGENT_ENUM_TYPES_H__ 1\n\n#include <glib-object.h>\n\nG_BEGIN_DECLS\n" \
75 --fprod "/* enumerations from \"@filename@\" */\n" \
76 --vhead "GType @enum_name@_get_type (void) G_GNUC_CONST;\n#define NICE_TYPE_@ENUMSHORT@ (@enum_name@_get_type())\n" \
77 --ftail "G_END_DECLS\n\n#endif /* !AGENT_ENUM_TYPES_H */" \
78 $(addprefix $(srcdir)/,$(pkginclude_HEADERS)) > $@
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 --fprod "\n/* enumerations from \"@filename@\" */" \
84 --vhead "GType\n@enum_name@_get_type (void)\n{\n static GType type = 0;\n if (!type) {\n static const G@Type@Value values[] = {" \
85 --vprod " { @VALUENAME@, \"@VALUENAME@\", \"@valuenick@\" }," \
86 --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)) > $@
89 libagent_la_LIBADD = \
90 $(top_builddir)/random/libnice-random.la \
91 $(top_builddir)/socket/libsocket.la \
92 $(top_builddir)/stun/libstun.la \
96 libagent_la_DEPENDENCIES = \
97 $(top_builddir)/random/libnice-random.la \
98 $(top_builddir)/socket/libsocket.la \
99 $(top_builddir)/stun/libstun.la
102 libagent_la_LIBADD += -liphlpapi -lws2_32
106 # GObject introspection
108 # We need --accept-unprefixed because of PseudoTcp and TurnServer.
110 -include $(INTROSPECTION_MAKEFILE)
112 INTROSPECTION_SCANNER_ARGS = --add-include-path=$(srcdir) --warn-all --accept-unprefixed
113 INTROSPECTION_COMPILER_ARGS = --includedir=$(srcdir)
115 if HAVE_INTROSPECTION
116 introspection_sources = $(pkginclude_HEADERS)
118 Nice-0.1.gir: libagent.la
119 Nice_0_1_gir_INCLUDES = GObject-2.0 Gio-2.0
120 Nice_0_1_gir_EXPORT_PACKAGES = nice
121 Nice_0_1_gir_CFLAGS = $(AM_CFLAGS)
122 Nice_0_1_gir_LIBS = libagent.la
123 Nice_0_1_gir_FILES = $(introspection_sources)
124 INTROSPECTION_GIRS += Nice-0.1.gir
126 girdir = $(datadir)/gir-1.0
127 gir_DATA = $(INTROSPECTION_GIRS)
129 typelibdir = $(libdir)/girepository-1.0
130 typelib_DATA = $(INTROSPECTION_GIRS:.gir=.typelib)
132 CLEANFILES += $(gir_DATA) $(typelib_DATA)
135 EXTRA_DIST = meson.build