-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile.am
147 lines (110 loc) · 4.22 KB
/
Makefile.am
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
AM_MAKEFLAGS = --no-print-directory
includedir = @includedir@/connline
include_HEADERS = include/backend.h \
include/connline.h \
include/data.h \
include/dbus.h \
include/event.h \
include/list.h \
include/utils.h
noinst_HEADERS = include/private.h
local_headers = $(foreach file,$(include_HEADERS) $(noinst_HEADERS), \
include/connline/$(notdir $(file)))
BUILT_SOURCES = $(local_headers)
CLEANFILES = $(BUILT_SOURCES)
plugindir = $(libdir)/connline
if MAINTAINER_MODE
build_plugindir = $(abs_top_srcdir)/plugins/.libs
else
build_plugindir = $(plugindir)
endif # MAINTAINER_MODE
lib_LTLIBRARIES = src/libconnline.la
src_libconnline_la_CPPFLAGS = -std=gnu99 -Wall -Werror -O2 \
-U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 \
-DCONNLINE_PLUGIN_DIR=\""$(build_plugindir)"\" \
$(DBUS_CFLAGS) $(DEV_CFLAGS)
src_libconnline_la_LIBADD = $(DBUS_LIBS) -ldl
src_libconnline_la_SOURCES = src/backend.c \
src/connline.c \
src/dbus.c \
src/event.c \
src/list.c \
src/plugin.c \
src/utils.c
plugin_LTLIBRARIES =
plugin_objects =
plugin_cflags = -std=gnu99 -Wall -O2 -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 \
$(DBUS_CFLAGS) $(DEV_CFLAGS)
plugin_ldflags = -no-undefined -module -avoid-version $(DBUS_LIBS)
if CONNLINE_EVENT_GLIB
plugin_LTLIBRARIES += plugins/event_glib.la
plugin_objects += $(plugins_event_glib_la_OBJECTS)
plugins_event_glib_la_CFLAGS = $(plugin_cflags) $(GLIB_CFLAGS)
plugins_event_glib_la_LDFLAGS = $(plugin_ldflags) $(GLIB_LIBS)
plugins_event_glib_la_SOURCES = plugins/glib.c
endif # CONNLINE_EVENT_GLIB
if CONNLINE_EVENT_EFL
plugin_LTLIBRARIES += plugins/event_efl.la
plugin_objects += $(plugins_event_efl_la_OBJECTS)
plugins_event_efl_la_CFLAGS = $(plugin_cflags) $(EFL_CFLAGS)
plugins_event_efl_la_LDFLAGS = $(plugin_ldflags) $(EFL_LIBS)
plugins_event_efl_la_SOURCES = plugins/efl.c
endif # CONNLINE_EVENT_EFL
if CONNLINE_EVENT_LIBEVENT
plugin_LTLIBRARIES += plugins/event_libevent.la
plugin_objects += $(plugins_event_libevent_la_OBJECTS)
plugins_event_libevent_la_CFLAGS = $(plugin_cflags) $(LIBEVENT_CFLAGS) $(GLIB_CFLAGS)
plugins_event_libevent_la_LDFLAGS = $(plugin_ldflags) $(LIBEVENT_LIBS) $(GLIB_LIBS)
plugins_event_libevent_la_SOURCES = plugins/libevent.c
endif # CONNLINE_EVENT_LIBEVENT
if CONNLINE_BACKEND_CONNMAN
plugin_LTLIBRARIES += plugins/backend_connman.la
plugin_objects += $(plugins_backend_connman_la_OBJECTS)
plugins_backend_connman_la_CFLAGS = $(plugin_cflags)
plugins_backend_connman_la_LDFLAGS = $(plugin_ldflags)
plugins_backend_connman_la_SOURCES = plugins/connman.c
endif # CONNLINE_BACKEND_CONNMAN
if CONNLINE_BACKEND_NM
plugin_LTLIBRARIES += plugins/backend_nm.la
plugin_objects += $(plugins_backend_nm_la_OBJECTS)
plugins_backend_nm_la_CFLAGS = $(plugin_cflags)
plugins_backend_nm_la_LDFLAGS = $(plugin_ldflags)
plugins_backend_nm_la_SOURCES = plugins/nm.c
endif # CONNLINE_BACKEND_NM
if CONNLINE_BACKEND_WICD
plugin_LTLIBRARIES += plugins/backend_wicd.la
plugin_objects += $(plugins_backend_wicd_la_OBJECTS)
plugins_backend_wicd_la_CFLAGS = $(plugin_cflags)
plugins_backend_wicd_la_LDFLAGS = $(plugin_ldflags)
plugins_backend_wicd_la_SOURCES = plugins/wicd.c
endif # CONNLINE_BACKEND_WICD
if TEST
test_cflags = -std=gnu99 -Wall -O2 -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 \
$(DBUS_CFLAGS) $(DEV_CFLAGS)
noinst_PROGRAMS =
if CONNLINE_EVENT_GLIB
noinst_PROGRAMS += test/glib_test
test_glib_test_CFLAGS = $(test_cflags) $(GLIB_CFLAGS)
test_glib_test_LDADD = $(GLIB_LIBS) src/libconnline.la
test_glib_test_SOURCES = test/glib_test.c
endif # CONNLINE_EVENT_GLIB
if CONNLINE_EVENT_EFL
noinst_PROGRAMS += test/efl_test
test_efl_test_CFLAGS = $(test_cflags) $(EFL_CFLAGS)
test_efl_test_LDADD = $(EFL_LIBS) src/libconnline.la
test_efl_test_SOURCES = test/efl_test.c
endif # CONNLINE_EVENT_EFL
if CONNLINE_EVENT_LIBEVENT
noinst_PROGRAMS += test/libevent_test
test_libevent_test_CFLAGS = $(test_cflags) $(LIBEVENT_CFLAGS)
test_libevent_test_LDADD = $(LIBEVENT_LIBS) src/libconnline.la
test_libevent_test_SOURCES = test/libevent_test.c
endif # CONNLINE_EVENT_LIBEVENT
endif # TEST
pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = connline.pc
include/connline/%.h: $(abs_top_srcdir)/include/%.h
$(AM_V_at)$(MKDIR_P) include/connline
$(AM_V_GEN)$(LN_S) $< $@
clean-local:
@$(RM) -rf include/connline