File: Makefile.am

package info (click to toggle)
radvd 1%3A2.17-2
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 1,112 kB
  • sloc: ansic: 4,994; sh: 4,519; yacc: 829; makefile: 222; lex: 152
file content (282 lines) | stat: -rw-r--r-- 5,691 bytes parent folder | download
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
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
#
#
#   Authors:
#    Lars Fenneberg		<lf@elemental.net>	 
#
#   This software is Copyright 1996,1997 by the above mentioned author(s), 
#   All Rights Reserved.
#
#   The license which is distributed with this software in the file COPYRIGHT
#   applies to this software. If your distribution is missing this file, you
#   may request it from <reubenhwk@gmail.com>.
#


# $(CC) $(DEFS) -I. [$(mumble_CPPFLAGS)|$(AM_CPPFLAGS)] $(CPPFLAGS) [$(mumble_CFLAGS)|$(AM_CFLAGS)] $(CFLAGS)
# mumble_CPPFLAGS override AM_CPPFLAGS
# CPP is C PreProcessor

AUTOMAKE_OPTIONS = 1.2 foreign subdir-objects

###  Compiler flags and such ###

DEFS = \
	-DINET6=1 \
	-DLOG_FACILITY=$(LOG_FACILITY) \
	-DPATH_RADVD_CONF=\"$(PATH_RADVD_CONF)\" \
	-DPATH_RADVD_LOG=\"$(PATH_RADVD_LOG)\" \
	-DPATH_RADVD_PID=\"$(PATH_RADVD_PID)\" \
	-DVERSION=\"$(VERSION)\"

ENABLE_WARNINGS = \
	-Wall \
	-Wcast-qual \
	-Wmissing-declarations \
	-Wmissing-prototypes \
	-Wpointer-arith \
	-Wstrict-prototypes

DISABLE_WARNINGS = \
	-Wno-strict-aliasing \
	-Wno-cast-align \
	-Wno-strict-overflow

AM_CFLAGS = \
	-fno-strict-aliasing \
	-fstack-protector \
	$(ENABLE_WARNINGS) \
	$(DISABLE_WARNINGS)

### CPP is C PreProcessor ###

AM_YFLAGS = -d

noinst_LIBRARIES = libradvd-parser.a

radvd_LDADD = \
	libradvd-parser.a \
	@CONDITIONAL_SOURCES@

### Programs and sources ###

scanner.c: gram.h
gram.h: gram.c

libradvd_parser_a_CFLAGS = \
	-Wno-implicit-function-declaration

libradvd_parser_a_SOURCES = \
	gram.h \
	gram.y \
	scanner.l

sbin_PROGRAMS = \
	radvd \
	radvdump

EXTRA_radvd_SOURCES = \
	device-bsd44.c \
	device-linux.c \
	netlink.c \
	netlink.h \
	privsep-linux.c

radvd_SOURCES = \
	defaults.h \
	includes.h \
	log.c \
	log.h \
	pathnames.h \
	radvd.h \
	recv.c \
	socket.c \
	util.c \
	device-common.c \
	interface.c \
	process.c \
	radvd.c \
	send.c \
	timer.c

radvdump_SOURCES = \
	defaults.h \
	includes.h \
	log.c \
	log.h \
	pathnames.h \
	radvd.h \
	recv.c \
	socket.c \
	util.c \
	radvdump.c

### coverage ###

cov: check
	gcov *.c *.h *.l *.y
	lcov --capture --directory . --output-file coverage.info
	genhtml coverage.info --output-directory cov

### man pages ###

SUFFIXES = .man

.man:
	$(AM_V_GEN)$(SED) \
		-e 's,@''VERSION''@,$(VERSION),g' \
		-e 's,@''sbindir''@,$(sbindir),g' \
		-e 's,@''PATH_RADVD_CONF''@,$(PATH_RADVD_CONF),g' \
		-e 's,@''PATH_RADVD_PID''@,$(PATH_RADVD_PID),g' \
		-e 's,@''PATH_RADVD_LOG''@,$(PATH_RADVD_LOG),g' \
		-e 's,@''LOG_FACILITY''@,$(LOG_FACILITY),g' \
		$< > $@

man_MANS = \
	radvd.8 \
	radvd.conf.5 \
	radvdump.8


### build support ###

indent:
	clang-format -i *.c *.h test/*.c test/*.h

EXTRA_DIST = \
	CHANGES \
	COPYRIGHT \
	INTRO.html \
	copyright.blurb \
	radvd.8.man \
	radvd.conf.5.man \
	radvd.conf.example \
	radvd.service.in \
	radvdump.8.man \
	redhat/radvd-tmpfs.conf \
	redhat/radvd.conf.empty \
	redhat/radvd.init \
	redhat/radvd.spec \
	redhat/radvd.sysconfig \
	test/check.c \
	test/print_safe_buffer.c \
	test/print_safe_buffer.h \
	test/send.c \
	test/test1.conf \
	test/test_rdnss.conf \
	test/util.c

EXTENSIONS = gz bz2 lz lzma xz tarZ shar zip
HASHES = sha1 sha256 sha512

sign:
	$(AM_V_GEN)for e in $(EXTENSIONS); do \
		if [ -f radvd-$(VERSION).tar.$$e ]; then \
			for h in $(HASHES); do \
				$${h}sum radvd-$(VERSION).tar.$$e > radvd-$(VERSION).tar.$$e.$$h; \
			done; \
			gpg -sba radvd-$(VERSION).tar.$$e; \
		fi; \
	done

verify:
	$(AM_V_GEN)for e in $(EXTENSIONS); do \
		if [ -f radvd-$(VERSION).tar.$$e ]; then \
			for h in $(HASHES); do \
				$${h}sum -c radvd-$(VERSION).tar.$$e.$$h; \
			done; \
			gpg --verify radvd-$(VERSION).tar.$$e.asc; \
		fi; \
	done

html:
	$(AM_V_GEN)echo "<ul>"; \
	for e in $(EXTENSIONS); do \
		if [ -f radvd-$(VERSION).tar.$$e ]; then \
			echo "<li>"; \
			echo "<a href=\"dist/radvd-$(VERSION).tar.$$e\">radvd-$(VERSION).tar.$$e</a>"; \
			for h in $(HASHES); do \
				echo "<a href=\"dist/radvd-$(VERSION).tar.$$e.$$h\">[$$h]</a>"; \
			done; \
			echo "<a href=\"dist/radvd-$(VERSION).tar.$$e.asc\">[GPG]</a>"; \
			echo "</li>"; \
		fi; \
	done; \
	echo "</ul>"

packages:
	@if [[ "$$(git diff | wc -l)" != "0" ]] ; then printf "\n\n\tYou have local changes in the working copy...\n\n\n" && git diff && false ; fi
	$(MAKE) dist-gzip
	rm -rf radvd-$(VERSION)
	tar zfx radvd-$(VERSION).tar.gz
	cd radvd-$(VERSION) && ./configure --with-check && $(MAKE) check
	rm -rf radvd-$(VERSION)
	$(MAKE) dist-xz
	$(MAKE) sign
	$(MAKE) verify
	$(MAKE) html
	@if [[ "$$(git rev-parse HEAD)" != "$$(git rev-parse v$(VERSION))" ]] ; then printf "\n\n\tv$(VERSION) tag missing, or not checked out...\n\n\n" && false ; fi
	@printf "\n\n\tDont forget to push the v$(VERSION) tag and this branch to origin (git push origin v$(VERSION) master)\n\n\n"


dist-hook:
	rm -f $(distdir)/gram.c
	rm -f $(distdir)/gram.h
	rm -f $(distdir)/scanner.c

CLEANFILES = \
	radvd.8 \
	radvd.conf.5 \
	radvdump.8 \
	gram.c \
	gram.h \
	gram.dot \
	scanner.c \
	scanner.h \
	gram.dot

### Explicit Dependencies ###

radvd_DEPENDENCIES = \
	@CONDITIONAL_SOURCES@ \
	libradvd-parser.a

### make check ###

TESTS = check_all

check_PROGRAMS = check_all

EXTRA_check_all_SOURCES = \
	device-bsd44.c \
	device-linux.c \
	netlink.c \
	netlink.h \
	privsep-linux.c

check_all_SOURCES = \
	test/print_safe_buffer.h \
	test/print_safe_buffer.c \
	test/check.c \
	device-common.c \
	interface.c \
	log.c \
	send.c \
	timer.c \
	util.c

check_all_CFLAGS = \
	@CHECK_CFLAGS@ \
	-DUNIT_TEST

check_all_LDADD = \
	@CHECK_LIBS@ \
	@CONDITIONAL_SOURCES@ \
	libradvd-parser.a

DISTCHECK_CONFIGURE_FLAGS = \
  --with-systemdsystemunitdir=$$dc_install_base/$(systemdsystemunitdir)

if HAVE_SYSTEMD
systemdsystemunit_DATA = radvd.service
endif