File: Makefile.in

package info (click to toggle)
ipv6calc 1.0.0-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster, sid
  • size: 6,400 kB
  • sloc: ansic: 73,764; sh: 5,750; perl: 4,030; xml: 1,194; makefile: 888
file content (201 lines) | stat: -rw-r--r-- 5,943 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
# Project    : ipv6calc
# File       : Makefile[.in]
# Version    : $Id: 297c7ad69dd690875bb2b1645f7aa47726fb6508 $
# Copyright  : 2001-2015 by Peter Bieringer <pb (at) bieringer.de>
#
# Information:
#  Main Makefile for ipv6calc project
#

# Compiler and Linker Options
export DEFAULT_CFLAGS = -D_GNU_SOURCE -O2 -Wall -g @CFLAGS_EXTRA@

ifeq (@ENABLE_BUNDLED_GETOPT@, 1)
  GETOPT_MAKE = getopt-make
  GETOPT_DIR  = getopt
endif

ifeq (@ENABLE_BUNDLED_MD5@, 1)
  MD5_MAKE = md5-make
  MD5_DIR  = md5
endif

ifeq (@ENABLE_MOD_IPV6CALC@, 1)
  MOD_IPV6CALC_MAKE = mod_ipv6calc-make
  MOD_IPV6CALC_DIR  = mod_ipv6calc
endif


CC	= @CC@

all:		$(MD5_MAKE) $(GETOPT_MAKE) ipv6calc ipv6logconv ipv6logstats ipv6loganon $(MOD_IPV6CALC_MAKE)

.c.o:
		$(CC) -c $< $(DEFAULT_CFLAGS) $(CFLAGS) $(INCLUDES)


ipv6logconv:	$(GETOPT_MAKE) lib-make ipv6logconv-make

ipv6loganon:	$(GETOPT_MAKE) lib-make ipv6loganon-make ipv6logstats-make

ipv6logstats:	$(GETOPT_MAKE) lib-make ipv6logstats-make

ipv6calc:	$(GETOPT_MAKE) lib-make ipv6calc-make ipv6calcweb-make

updateclean:
		${MAKE} distclean
		for dir in databases/ieee-oui databases/ieee-iab databases/ipv4-assignment databases/ipv6-assignment; do \
			ocwd=`pwd`; \
			cd $$dir || exit 1; \
			${MAKE} $@ ; r=$$?; \
			rm -rf autom4te.cache; \
			cd $$ocwd; if [ $$r -ne 0 ]; then echo "Result: $$r"; exit $$r; fi; \
		done || exit 1

distclean:
		${MAKE} clean
		rm -f config.cache config.status config.log
		rm -rf autom4te.cache
		for dir in ipv6logconv ipv6loganon ipv6logstats ipv6calcweb ipv6calc mod_ipv6calc man lib md5 getopt databases/lib databases/ieee-oui36 databases/lib databases/ieee-oui databases/ieee-iab databases/ipv4-assignment databases/ipv6-assignment databases/registries databases/as-assignment databases/cc-assignment tools; do \
			ocwd=`pwd`; \
			cd $$dir || exit 1; \
			${MAKE} $@ ; r=$$?; \
			rm -rf autom4te.cache; \
			cd $$ocwd ; if [ $$r -ne 0 ]; then echo "Result: $$r"; exit $$r; fi; \
		done || exit 1

autoclean:
		${MAKE} distclean
		rm -f Makefile
		rm -f contrib/ipv6calc.spec
		rm -f config.h
		for dir in ipv6logconv ipv6loganon ipv6logstats ipv6calcweb ipv6calc mod_ipv6calc man lib databases/lib md5 getopt tools; do \
			ocwd=`pwd`; \
			cd $$dir || exit 1; \
			${MAKE} $@ ; r=$$?; \
			cd $$ocwd ; if [ $$r -ne 0 ]; then echo "Result: $$r"; exit $$r; fi; \
		done || exit 1

clean:
		for dir in ipv6logconv ipv6loganon ipv6logstats ipv6calcweb ipv6calc mod_ipv6calc man lib databases/lib md5 getopt tools; do \
			ocwd=`pwd`; \
			cd $$dir || exit 1; \
			${MAKE} $@ ; r=$$?; \
			cd $$ocwd ; if [ $$r -ne 0 ]; then echo "Result: $$r"; exit $$r; fi; \
		done || exit 1

install:
		for dir in ipv6logconv ipv6loganon ipv6logstats ipv6calcweb ipv6calc $(MOD_IPV6CALC_DIR) man lib databases/lib tools; do \
			ocwd=`pwd`; \
			cd $$dir || exit 1; \
			${MAKE} install; r=$$?; \
			cd $$ocwd ; if [ $$r -ne 0 ]; then echo "Result: $$r"; exit $$r; fi; \
		done || exit 1

getopt-make:
		cd getopt && ${MAKE}

md5-make:
		cd md5 && ${MAKE}

lib-make:	$(MD5_MAKE) $(GETOPT_MAKE) db-ieee-oui-make db-ieee-iab-make db-ipv4-assignment-make db-ipv6-assignment-make db-wrapper-make db-lib-make
		cd lib && ${MAKE} GETOPT_INCLUDE=@GETOPT_INCLUDE@

ipv6logconv-make: lib-make
		cd ipv6logconv && ${MAKE}

ipv6loganon-make: lib-make
		cd ipv6loganon && ${MAKE}

ipv6logstats-make: lib-make
		cd ipv6logstats && ${MAKE}

ipv6calc-make:	lib-make
		cd ipv6calc && ${MAKE}

ipv6calcweb-make: ipv6calc-make
		cd ipv6calcweb && ${MAKE}

mod_ipv6calc-make: lib-make
		cd mod_ipv6calc && ${MAKE}

db-wrapper-make:
		cd databases/lib && ${MAKE}

db-ieee-oui-make:
		cd databases/ieee-oui && ${MAKE}

db-ieee-oui36-make:
		cd databases/ieee-oui36 && ${MAKE}

db-ieee-iab-make:
		cd databases/ieee-iab && ${MAKE}

db-ipv4-assignment-make:
		cd databases/ipv4-assignment && ${MAKE}

db-ipv6-assignment-make:
		cd databases/ipv6-assignment && ${MAKE}

db-cc-assignment-make:
		cd databases/cc-assignment && ${MAKE}

db-as-assignment-make:
		cd databases/as-assignment && ${MAKE}

db-lib-make:	db-ieee-oui-make db-ieee-iab-make db-ipv4-assignment-make db-ipv6-assignment-make db-wrapper-make db-lib-make db-cc-assignment-make db-as-assignment-make
		cd databases/lib && ${MAKE}

update:
		for dir in databases/ieee-oui databases/ieee-oui36 databases/ieee-iab databases/registries; do \
			ocwd=`pwd`; \
			cd $$dir || exit 1; \
			${MAKE} $@ ; \
			cd $$ocwd ; \
		done || exit 1

static:		ipv6logconv-make ipv6loganon-make ipv6logstats-make ipv6calc-make	
		for dir in ipv6logconv ipv6logstats ipv6loganon ipv6calc; do \
			ocwd=`pwd`; \
			cd $$dir || exit 1; \
			${MAKE} $@ ; r=$$?; \
			cd $$ocwd ; if [ $$r -ne 0 ]; then echo "Result: $$r"; exit $$r; fi; \
		done || exit 1

test:
		for dir in ipv6calc ipv6logconv ipv6logstats ipv6loganon ipv6calcweb $(MOD_IPV6CALC_DIR); do \
			ocwd=`pwd`; \
			cd $$dir || exit 1; \
			${MAKE} $@ ; r=$$?; \
			cd $$ocwd ; if [ $$r -ne 0 ]; then echo "Result: $$r"; exit $$r; fi; \
		done || exit 1
		echo "ALL TESTS SUCCESSFUL"

test-minimal:
		for dir in ipv6calc ipv6logconv ipv6logstats ipv6loganon ipv6calcweb; do \
			ocwd=`pwd`; \
			cd $$dir || exit 1; \
			${MAKE} $@ ; r=$$?; \
			cd $$ocwd ; if [ $$r -ne 0 ]; then echo "Result: $$r"; exit $$r; fi; \
		done

test-ldlibpath:
		for dir in ipv6calc ipv6logconv ipv6logstats ipv6loganon ipv6calcweb; do \
			ocwd=`pwd`; \
			cd $$dir || exit 1; \
			${MAKE} $@ ; r=$$?; \
			cd $$ocwd ; if [ $$r -ne 0 ]; then echo "Result: $$r"; exit $$r; fi; \
		done

codecheck:
		# catch use of strncpy
		LC_ALL=C find . -type f -name '*.c' | xargs -r grep strncpy || exit 0
		# catch use of strcpy
		LC_ALL=C find . -type f -name '*.c' | xargs -r grep strcpy || exit 0

		for dir in ipv6calc ipv6logconv ipv6logstats ipv6loganon; do \
			ocwd=`pwd`; \
			cd $$dir || exit 1; \
			${MAKE} $@ ; r=$$?; \
			cd $$ocwd ; if [ $$r -ne 0 ]; then echo "Result: $$r"; exit $$r; fi; \
		done || exit 1