-
Notifications
You must be signed in to change notification settings - Fork 29
/
Makefile.am
214 lines (182 loc) · 3.7 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
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
#
# MiracleCast - Global Makefile
# Copyright (c) 2013-2014 David Herrmann <[email protected]>
#
#
# Global Configurations and Initializations
#
ACLOCAL_AMFLAGS = -I m4 ${ACLOCAL_FLAGS}
AM_MAKEFLAGS = --no-print-directory
AUTOMAKE_OPTIONS = color-tests
SUBDIRS = .
.DELETE_ON_ERROR:
include_HEADERS =
EXTRA_DIST = \
README \
COPYING \
NEWS \
res/wpa.conf
CLEANFILES =
pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA =
TPHONY =
TESTS =
bin_PROGRAMS =
check_PROGRAMS =
lib_LTLIBRARIES =
noinst_LTLIBRARIES =
#
# Default CFlags
# Make all files include "config.h" by default. This shouldn't cause any
# problems and we cannot forget to include it anymore.
# Also make the linker discard all unused symbols.
#
AM_CFLAGS = \
-Wall \
-pipe \
-fno-common \
-ffast-math \
-fdiagnostics-show-option \
-fno-strict-aliasing \
-fvisibility=hidden \
-ffunction-sections \
-fdata-sections
AM_CPPFLAGS = \
-include $(top_builddir)/config.h \
-I $(srcdir)/src \
-I $(srcdir)/src/shared \
-I /usr/local/include \
-DBUILD_ENABLE_DEBUG \
'-DBUILD_BINDIR="$(bindir)"'
AM_LDFLAGS = \
-Wl,--as-needed \
-Wl,--gc-sections \
-Wl,-z,relro \
-Wl,-z,now
AM_LIBADD = \
-lsystemd
#
# Shared Helpers
#
noinst_LTLIBRARIES += libmiracle-shared.la
libmiracle_shared_la_SOURCES = \
src/shared/shl_dlist.h \
src/shared/shl_htable.h \
src/shared/shl_htable.c \
src/shared/shl_log.h \
src/shared/shl_log.c \
src/shared/shl_macro.h \
src/shared/shl_util.h \
src/shared/shl_util.c \
src/shared/util.h \
src/shared/wpas.h \
src/shared/wpas.c
libmiracle_shared_la_CPPFLAGS = $(AM_CPPFLAGS)
libmiracle_shared_la_LDFLAGS = $(AM_LDFLAGS)
libmiracle_shared_la_LIBADD = $(AM_LIBADD)
#
# miracle-wifid
#
bin_PROGRAMS += miracle-wifid
miracle_wifid_SOURCES = \
src/wifi/wifid.h \
src/wifi/wifid.c \
src/wifi/wifid-dbus.c \
src/wifi/wifid-link.c \
src/wifi/wifid-peer.c \
src/wifi/wifid-supplicant.c
miracle_wifid_CPPFLAGS = \
$(AM_CPPFLAGS) \
$(DEPS_CFLAGS)
miracle_wifid_LDADD = \
libmiracle-shared.la \
$(DEPS_LIBS)
miracle_wifid_LDFLAGS = $(AM_LDFLAGS)
#
# miracle-wifictl
#
bin_PROGRAMS += miracle-wifictl
miracle_wifictl_SOURCES = \
src/ctl/ctl.h \
src/ctl/ctl-cli.c \
src/ctl/ctl-wifi.c \
src/ctl/wifictl.c
miracle_wifictl_CPPFLAGS = \
$(AM_CPPFLAGS) \
$(DEPS_CFLAGS)
miracle_wifictl_LDADD = \
libmiracle-shared.la \
-lreadline \
$(DEPS_LIBS)
miracle_wifictl_LDFLAGS = $(AM_LDFLAGS)
#
# miracle-dhcp
#
bin_PROGRAMS += miracle-dhcp
miracle_dhcp_SOURCES = \
src/dhcp/dhcp.c \
src/dhcp/gdhcp.h \
src/dhcp/unaligned.h \
src/dhcp/common.h \
src/dhcp/common.c \
src/dhcp/ipv4ll.h \
src/dhcp/ipv4ll.c \
src/dhcp/client.c \
src/dhcp/server.c
miracle_dhcp_CPPFLAGS = \
$(AM_CPPFLAGS) \
$(DEPS_CFLAGS) \
$(GDHCP_CFLAGS)
miracle_dhcp_LDADD = \
libmiracle-shared.la \
$(DEPS_LIBS) \
$(GDHCP_LIBS)
miracle_dhcp_LDFLAGS = $(AM_LDFLAGS)
#
# miracled
#
bin_PROGRAMS += miracled
miracled_SOURCES = \
src/miracled.h \
src/miracled.c
miracled_CPPFLAGS = \
$(AM_CPPFLAGS) \
$(DEPS_CFLAGS)
miracled_LDADD = \
libmiracle-shared.la \
$(DEPS_LIBS)
miracled_LDFLAGS = $(AM_LDFLAGS)
#
# Tests
#
tests = \
test_wpas
if BUILD_HAVE_CHECK
check_PROGRAMS += $(tests)
TESTS += $(tests)
endif
test_sources = \
test/test_common.h
test_libs = \
libmiracle-shared.la \
$(DEPS_LIBS) \
$(CHECK_LIBS)
test_cflags = \
$(AM_CPPFLAGS) \
$(DEPS_CFLAGS) \
$(CHECK_CFLAGS)
test_lflags = \
$(AM_LDFLAGS)
test_wpas_SOURCES = test/test_wpas.c $(test_sources)
test_wpas_CPPFLAGS = $(test_cflags)
test_wpas_LDADD = $(test_libs)
test_wpas_LDFLAGS = $(test_lflags)
#
# Phony targets
#
.PHONY: $(TPHONY)
#
# Empty .SECONDARY target causes alle intermediate files to be treated as
# secondary files. That is, they don't get deleted after make finished.
#
.SECONDARY: