libnm-util: use "nm-shared-utils.h"
[NetworkManager.git] / libnm-util / Makefile.am
1 include $(GLIB_MAKEFILE)
2
3 SUBDIRS = . tests
4
5 AM_CPPFLAGS = \
6         -I${top_srcdir} \
7         -I${top_srcdir}/shared \
8         -I$(top_builddir)/shared \
9         -DG_LOG_DOMAIN=\""libnm-util"\" \
10         -DLOCALEDIR=\"$(datadir)/locale\" \
11         -DNETWORKMANAGER_COMPILATION=NM_NETWORKMANAGER_COMPILATION_LIB_LEGACY \
12         -DNM_VERSION_MAX_ALLOWED=NM_VERSION_NEXT_STABLE \
13         $(GLIB_CFLAGS) \
14         $(DBUS_CFLAGS) \
15         $(UUID_CFLAGS)
16
17 if WITH_GNUTLS
18 AM_CPPFLAGS += $(GNUTLS_CFLAGS)
19 endif
20
21 if WITH_NSS
22 AM_CPPFLAGS += $(NSS_CFLAGS)
23 endif
24
25 lib_LTLIBRARIES=libnm-util.la
26
27 libnm_util_include_HEADERS =            \
28         $(top_builddir)/shared/nm-version-macros.h \
29         NetworkManager.h                \
30         NetworkManagerVPN.h             \
31         nm-connection.h                 \
32         nm-setting.h                    \
33         nm-setting-8021x.h              \
34         nm-setting-adsl.h               \
35         nm-setting-bluetooth.h          \
36         nm-setting-bond.h               \
37         nm-setting-team.h               \
38         nm-setting-team-port.h          \
39         nm-setting-bridge.h             \
40         nm-setting-bridge-port.h        \
41         nm-setting-connection.h         \
42         nm-setting-dcb.h                \
43         nm-setting-infiniband.h         \
44         nm-setting-ip4-config.h         \
45         nm-setting-vlan.h               \
46         nm-setting-ip6-config.h         \
47         nm-setting-ppp.h                \
48         nm-setting-pppoe.h              \
49         nm-setting-serial.h             \
50         nm-setting-generic.h            \
51         nm-setting-gsm.h                \
52         nm-setting-cdma.h               \
53         nm-setting-olpc-mesh.h          \
54         nm-setting-wimax.h              \
55         nm-setting-wired.h              \
56         nm-setting-wireless.h           \
57         nm-setting-wireless-security.h  \
58         nm-setting-vpn.h                \
59         nm-utils.h \
60         nm-version.h
61
62 nodist_libnm_util_include_HEADERS = \
63         nm-utils-enum-types.h
64
65 libnm_util_la_private_headers = \
66         $(top_builddir)/shared/nm-shared-utils.h \
67         crypto.h                        \
68         nm-dbus-glib-types.h            \
69         nm-gvaluearray-compat.h         \
70         nm-param-spec-specialized.h     \
71         nm-setting-private.h            \
72         nm-utils-private.h
73
74 libnm_util_la_csources = \
75         $(top_builddir)/shared/nm-shared-utils.c \
76         crypto.c                        \
77         nm-connection.c                 \
78         nm-param-spec-specialized.c     \
79         nm-setting.c                    \
80         nm-setting-8021x.c              \
81         nm-setting-adsl.c               \
82         nm-setting-bluetooth.c          \
83         nm-setting-bond.c               \
84         nm-setting-team.c               \
85         nm-setting-team-port.c          \
86         nm-setting-bridge.c             \
87         nm-setting-bridge-port.c        \
88         nm-setting-connection.c         \
89         nm-setting-dcb.c                \
90         nm-setting-infiniband.c         \
91         nm-setting-ip4-config.c         \
92         nm-setting-vlan.c               \
93         nm-setting-ip6-config.c         \
94         nm-setting-ppp.c                \
95         nm-setting-pppoe.c              \
96         nm-setting-serial.c             \
97         nm-setting-generic.c            \
98         nm-setting-gsm.c                \
99         nm-setting-cdma.c               \
100         nm-setting-olpc-mesh.c          \
101         nm-setting-wimax.c              \
102         nm-setting-wired.c              \
103         nm-setting-wireless.c           \
104         nm-setting-wireless-security.c  \
105         nm-setting-vpn.c                \
106         nm-utils-enum-types.c           \
107         nm-utils.c                      \
108         nm-value-transforms.c
109
110 libnm_util_la_SOURCES = \
111         $(libnm_util_la_csources) \
112         $(libnm_util_la_private_headers)
113
114 GLIB_GENERATED = nm-utils-enum-types.h nm-utils-enum-types.c
115 BUILT_SOURCES = $(GLIB_GENERATED)
116 nm_utils_enum_types_sources = $(filter-out NetworkManager%,$(libnm_util_include_HEADERS))
117 GLIB_MKENUMS_H_FLAGS = --identifier-prefix NM
118 GLIB_MKENUMS_C_FLAGS = --identifier-prefix NM
119
120 libnm_util_la_LIBADD = $(GLIB_LIBS) $(DBUS_LIBS) $(UUID_LIBS)
121
122 SYMBOL_VIS_FILE=$(srcdir)/libnm-util.ver
123
124 libnm_util_la_LDFLAGS = -Wl,--version-script=$(SYMBOL_VIS_FILE) \
125         -version-info "9:0:7"
126
127 if WITH_GNUTLS
128 libnm_util_la_SOURCES += crypto_gnutls.c
129 libnm_util_la_LIBADD += $(GNUTLS_LIBS)
130 endif
131
132 if WITH_NSS
133 libnm_util_la_SOURCES += crypto_nss.c
134 libnm_util_la_LIBADD += $(NSS_LIBS)
135 endif
136
137 libnm_util_includedir=$(includedir)/NetworkManager
138
139
140 ###########################################
141 # Crypto test library
142 ###########################################
143
144 noinst_LTLIBRARIES = libtest-crypto.la
145
146 libtest_crypto_la_SOURCES = crypto.c
147
148 libtest_crypto_la_LIBADD = \
149         $(GLIB_LIBS)
150
151 if WITH_GNUTLS
152 libtest_crypto_la_SOURCES += crypto_gnutls.c
153 libtest_crypto_la_LIBADD += $(GNUTLS_LIBS)
154 endif
155
156 if WITH_NSS
157 libtest_crypto_la_SOURCES += crypto_nss.c
158 libtest_crypto_la_LIBADD += $(NSS_LIBS)
159 endif
160
161 pkgconfigdir = $(libdir)/pkgconfig
162 pkgconfig_DATA = libnm-util.pc
163
164 DISTCLEANFILES = libnm-util.pc
165
166 EXTRA_DIST = libnm-util.pc.in libnm-util.ver
167
168 -include $(INTROSPECTION_MAKEFILE)
169 INTROSPECTION_GIRS =
170 INTROSPECTION_SCANNER_ARGS = --add-include-path=$(srcdir)
171 INTROSPECTION_COMPILER_ARGS = --includedir=$(srcdir)
172
173 if HAVE_INTROSPECTION
174 introspection_sources = $(libnm_util_include_HEADERS) $(nodist_libnm_util_include_HEADERS) $(libnm_util_la_csources)
175
176 NetworkManager-1.0.gir: libnm-util.la
177 NetworkManager_1_0_gir_INCLUDES = GObject-2.0 DBusGLib-1.0
178 NetworkManager_1_0_gir_PACKAGES = gobject-2.0 dbus-glib-1
179 NetworkManager_1_0_gir_EXPORT_PACKAGES = libnm-util
180 NetworkManager_1_0_gir_CFLAGS = $(AM_CPPFLAGS) -I$(top_srcdir)/libnm-util
181 NetworkManager_1_0_gir_LIBS = libnm-util.la
182 NetworkManager_1_0_gir_FILES = $(introspection_sources)
183 NetworkManager_1_0_gir_SCANNERFLAGS = --warn-all --identifier-prefix=NM --symbol-prefix=nm
184 INTROSPECTION_GIRS += NetworkManager-1.0.gir
185
186 girdir = $(datadir)/gir-1.0
187 gir_DATA = $(INTROSPECTION_GIRS)
188
189 typelibdir = $(libdir)/girepository-1.0
190 typelib_DATA = $(INTROSPECTION_GIRS:.gir=.typelib)
191
192 CLEANFILES = $(gir_DATA) $(typelib_DATA)
193
194 endif
195
196 if ENABLE_TESTS
197
198 check-local:
199         $(top_srcdir)/tools/check-exports.sh $(builddir)/.libs/libnm-util.so $(SYMBOL_VIS_FILE)
200
201 endif
202