fix zlib build on machines where LDFLAGS gets set to something broken
[openwrt.git] / package / Makefile
1 # Main makefile for the packages
2 include $(TOPDIR)/rules.mk
3
4 package-:=tcp_wrappers
5 package-y:=nvram
6 package-$(BR2_PACKAGE_AICCU) += aiccu
7 package-$(BR2_PACKAGE_AMWALL) += amwall
8 package-$(BR2_PACKAGE_ARPTABLES) += arptables
9 package-$(BR2_PACKAGE_ARPWATCH) += arpwatch
10 package-$(BR2_PACKAGE_ASTERISK) += asterisk
11 package-$(BR2_PACKAGE_ATFP) += atftp
12 package-$(BR2_COMPILE_AVAHI) += avahi
13 package-$(BR2_PACKAGE_BIND) += bind
14 package-$(BR2_PACKAGE_BLUEZ_LIBS) += bluez-libs
15 package-$(BR2_PACKAGE_BLUEZ_UTILS) += bluez-utils
16 package-$(BR2_PACKAGE_BRIDGE) += bridge
17 package-$(BR2_PACKAGE_BUSYBOX) += busybox
18 package-$(BR2_PACKAGE_BWM) += bwm
19 package-$(BR2_PACKAGE_CGILIB) += cgilib
20 package-$(BR2_PACKAGE_CHILLISPOT) += chillispot
21 package-$(BR2_PACKAGE_CIFSMOUNT) += cifsmount
22 package-$(BR2_PACKAGE_CUPS) += cups
23 package-$(BR2_PACKAGE_CYRUS_SASL) += cyrus-sasl
24 package-$(BR2_PACKAGE_DHCP) += dhcp
25 package-$(BR2_PACKAGE_DHCP_FORWARDER) += dhcp-forwarder
26 package-$(BR2_PACKAGE_DNSMASQ) += dnsmasq
27 package-$(BR2_PACKAGE_DOSFSTOOLS) += dosfstools
28 package-$(BR2_PACKAGE_DROPBEAR) += dropbear
29 package-$(BR2_PACKAGE_DSNIFF) += dsniff
30 package-$(BR2_PACKAGE_E2FSPROGS) += e2fsprogs
31 package-$(BR2_PACKAGE_EBTABLES) += ebtables
32 package-$(BR2_PACKAGE_ETHER_WAKE) += ether-wake
33 package-$(BR2_COMPILE_EXPAT) += expat
34 package-$(BR2_PACKAGE_EZIPUPDATE) += ez-ipupdate
35 package-$(BR2_PACKAGE_FPING) += fping
36 package-$(BR2_PACKAGE_FPROBE) += fprobe
37 package-$(BR2_PACKAGE_FPROBE_ULOG) += fprobe-ulog
38 package-$(BR2_PACKAGE_FREERADIUS) += freeradius
39 package-$(BR2_PACKAGE_FREETYPE) += freetype
40 package-$(BR2_PACKAGE_FRICKIN) += frickin
41 package-$(BR2_PACKAGE_FUSE) += fuse
42 package-$(BR2_PACKAGE_GDBSERVER) += gdbserver
43 package-$(BR2_PACKAGE_GLIB) += glib
44 package-$(BR2_PACKAGE_GMP) += gmp
45 package-$(BR2_COMPILE_GNUTLS) += gnutls
46 package-$(BR2_PACKAGE_HASERL) += haserl
47 package-$(BR2_PACKAGE_HOSTAPD) += hostapd
48 package-$(BR2_PACKAGE_HOWL) += howl
49 package-$(BR2_PACKAGE_HTPDATE) += htpdate
50 package-$(BR2_PACKAGE_IPKG) += ipkg
51 package-$(BR2_PACKAGE_IPROUTE2) += iproute2
52 package-$(BR2_PACKAGE_IPTABLES) += iptables
53 package-$(BR2_PACKAGE_IRSSI) += irssi
54 package-$(BR2_PACKAGE_KISMET) += kismet
55 package-$(BR2_PACKAGE_L2TPD) += l2tpd
56 package-$(BR2_PACKAGE_LCD4LINUX) += lcd4linux
57 package-$(BR2_PACKAGE_LESS) += less
58 package-$(BR2_PACKAGE_LIBAMSEL) += libamsel
59 package-$(BR2_PACKAGE_LIBART) += libart
60 package-$(BR2_PACKAGE_LIBDAEMON) += libdaemon
61 package-$(BR2_PACKAGE_LIBDB) += libdb
62 package-$(BR2_PACKAGE_LIBELF) += libelf
63 package-$(BR2_PACKAGE_LIBEVENT) += libevent
64 package-$(BR2_PACKAGE_LIBFFI_SABLE) += libffi-sable
65 package-$(BR2_PACKAGE_LIBGCRYPT) += libgcrypt
66 package-$(BR2_PACKAGE_LIBGD) += libgd
67 package-$(BR2_PACKAGE_LIBGDBM) += libgdbm
68 package-$(BR2_PACKAGE_LIBGPG_ERROR) += libgpg-error
69 package-$(BR2_PACKAGE_LIBID3TAG) += libid3tag
70 package-$(BR2_PACKAGE_LIBNET) += libnet
71 package-$(BR2_PACKAGE_LIBNIDS) += libnids
72 package-$(BR2_PACKAGE_LIBOSIP2) += libosip2
73 package-$(BR2_PACKAGE_LIBPCAP) += libpcap
74 package-$(BR2_PACKAGE_LIBPNG) += libpng
75 package-$(BR2_PACKAGE_LIBPTHREAD) += libpthread
76 package-$(BR2_PACKAGE_LIBTASN1) += libtasn1
77 package-$(BR2_PACKAGE_LIBTOOL) += libtool
78 package-$(BR2_PACKAGE_LIBUSB) += libusb
79 package-$(BR2_PACKAGE_LIBXML2) += libxml2
80 package-$(BR2_PACKAGE_LIBXSLT) += libxslt
81 package-$(BR2_PACKAGE_LIGHTTPD) += lighttpd
82 package-$(BR2_PACKAGE_LINUX_ATM) += linux-atm
83 package-$(BR2_PACKAGE_LUA) += lua
84 package-$(BR2_PACKAGE_LZO) += lzo
85 package-$(BR2_PACKAGE_MADWIFI_TOOLS) += madwifi-tools
86 package-$(BR2_PACKAGE_MARADNS) += maradns
87 package-$(BR2_PACKAGE_MATRIXSSL) += matrixssl
88 package-$(BR2_PACKAGE_MICROCOM) += microcom
89 package-$(BR2_PACKAGE_MICROPERL) += microperl
90 package-$(BR2_PACKAGE_MINI_HTTPD) += mini_httpd
91 package-$(BR2_PACKAGE_MINI_SENDMAIL) += mini_sendmail
92 package-$(BR2_PACKAGE_MONIT) += monit
93 package-$(BR2_PACKAGE_MT_DAAPD) += mt-daapd
94 package-$(BR2_PACKAGE_MTD) += mtd
95 package-$(BR2_PACKAGE_MYSQL) += mysql
96 package-$(BR2_PACKAGE_NCURSES) += ncurses
97 package-$(BR2_PACKAGE_NDISC) += ndisc
98 package-$(BR2_PACKAGE_NET_SNMP) += net-snmp
99 package-$(BR2_PACKAGE_NFS_SERVER) += nfs-server
100 package-$(BR2_PACKAGE_NMAP) += nmap
101 package-$(BR2_PACKAGE_NOCATSPLASH) += nocatsplash
102 package-$(BR2_PACKAGE_NTPCLIENT) += ntpclient
103 package-$(BR2_PACKAGE_OLSRD) += olsrd
104 package-$(BR2_PACKAGE_OPENCDK) += opencdk
105 package-$(BR2_PACKAGE_OPENLDAP) += openldap
106 package-$(BR2_PACKAGE_OPENNTPD) += openntpd
107 package-$(BR2_PACKAGE_OPENSSH) += openssh
108 package-$(BR2_PACKAGE_OPENSSL) += openssl
109 package-$(BR2_PACKAGE_OPENSWAN) += openswan
110 package-$(BR2_PACKAGE_OPENVPN) += openvpn
111 package-$(BR2_PACKAGE_OSIRIS) += osiris
112 package-$(BR2_PACKAGE_PARPROUTED) += parprouted
113 package-$(BR2_PACKAGE_PCRE) += pcre
114 package-$(BR2_COMPILE_PHP4) += php4
115 package-$(BR2_COMPILE_PHP5) += php5
116 package-$(BR2_PACKAGE_PICOCOM) += picocom
117 package-$(BR2_PACKAGE_PMACCT) += pmacct
118 package-$(BR2_PACKAGE_POPT) += popt
119 package-$(BR2_PACKAGE_PORTMAP) += portmap
120 package-$(BR2_PACKAGE_PORTSENTRY) += portsentry
121 package-$(BR2_PACKAGE_POSTGRESQL) += postgresql
122 package-$(BR2_PACKAGE_PPP) += ppp
123 package-$(BR2_PACKAGE_PPTP) += pptp
124 package-$(BR2_PACKAGE_PPTPD) += pptpd
125 package-$(BR2_PACKAGE_QUAGGA) += quagga
126 package-$(BR2_PACKAGE_RADVD) += radvd
127 package-$(BR2_PACKAGE_READLINE) += readline
128 package-$(BR2_PACKAGE_ROBOCFG) += robocfg
129 package-$(BR2_PACKAGE_RP_PPPOE) += rp-pppoe
130 package-$(BR2_PACKAGE_RRDCOLLECT) += rrdcollect
131 package-$(BR2_COMPILE_RRDTOOL) += rrdtool
132 package-$(BR2_PACKAGE_RSYNC) += rsync
133 package-$(BR2_PACKAGE_SABLEVM) += sablevm
134 package-$(BR2_PACKAGE_SABLEVM_CLASSPATH) += sablevm-classpath
135 package-$(BR2_COMPILE_SAMBA) += samba
136 package-$(BR2_PACKAGE_SCREEN) += screen
137 package-$(BR2_PACKAGE_SDK) += sdk
138 package-$(BR2_PACKAGE_SER) += ser
139 package-$(BR2_PACKAGE_SETSERIAL) += setserial
140 package-$(BR2_PACKAGE_SHAT) += shat
141 package-$(BR2_PACKAGE_SHFS) += shfs
142 package-$(BR2_PACKAGE_SIPROXD) += siproxd
143 package-$(BR2_PACKAGE_SIPSAK) += sipsak
144 package-$(BR2_PACKAGE_SNORT) += snort
145 package-$(BR2_PACKAGE_SPEEX) += speex
146 package-$(BR2_PACKAGE_SQLITE) += sqlite
147 package-$(BR2_PACKAGE_SQLITE2) += sqlite2
148 package-$(BR2_PACKAGE_SSMTP) += ssmtp
149 package-$(BR2_PACKAGE_STRACE) += strace
150 package-$(BR2_PACKAGE_TCPDUMP) += tcpdump
151 package-$(BR2_PACKAGE_TINC) += tinc
152 package-$(BR2_PACKAGE_TOR) += tor
153 package-$(BR2_PACKAGE_TTCP) += ttcp
154 package-$(BR2_PACKAGE_UCLIBCXX) += uclibc++
155 package-$(BR2_PACKAGE_ULOGD) += ulogd
156 package-$(BR2_PACKAGE_USBUTILS) += usbutils
157 package-$(BR2_PACKAGE_VTUN) += vtun
158 package-$(BR2_PACKAGE_VSFTPD) += vsftpd
159 package-$(BR2_PACKAGE_WIFICONF) += wificonf
160 package-$(BR2_PACKAGE_WIVIZ) += wiviz
161 package-$(BR2_PACKAGE_WIRELESS_TOOLS) += wireless-tools
162 package-$(BR2_PACKAGE_WOL) += wol
163 package-$(BR2_PACKAGE_WPA_SUPPLICANT) += wpa_supplicant
164 package-$(BR2_PACKAGE_WPUT) += wput
165 package-$(BR2_PACKAGE_XINETD) += xinetd
166 package-$(BR2_PACKAGE_ZLIB) += zlib
167
168 DEV_LIBS:=tcp_wrappers glib ncurses openssl pcre popt zlib libnet libpcap mysql postgresql iptables matrixssl lzo gmp fuse portmap libelf uclibc++ speex libpng libgd wireless-tools nvram linux-atm
169 DEV_LIBS_COMPILE:=$(patsubst %,%-compile,$(DEV_LIBS))
170 SDK_DEFAULT_PACKAGES:=busybox dnsmasq iptables wireless-tools dropbear bridge ipkg ppp
171 SDK_DEFAULT_COMPILE:=$(patsubst %,%-compile,$(SDK_DEFAULT_PACKAGES))
172 COMPILE_PACKAGES:=$(patsubst %,%-compile,$(package-y) $(package-m))
173 INSTALL_PACKAGES:=$(patsubst %,%-install,$(package-y))
174
175 all: compile
176 clean: $(patsubst %,%-clean,$(package-) $(package-y) $(package-m))
177 compile: $(COMPILE_PACKAGES)
178 install: base-files-install $(INSTALL_PACKAGES)
179
180 $(COMPILE_PACKAGES): base-files-compile
181 $(INSTALL_PACKAGES): base-files-install
182
183 amwall-compile: libamsel-compile
184 arpwatch-compile: libpcap-compile
185 avahi-compile: libdaemon-compile expat-compile
186 bind-compile: openssl-compile
187 cyrus-sasl-compile: openssl-compile
188 dropbear-compile: zlib-compile
189 dsniff-compile: libnids-compile openssl-compile libgdbm-compile
190 freetype-compile: zlib-compile
191 fprobe-compile: libpcap-compile
192 gdbserver-compile: ncurses-compile
193 gnutls-compile: libgcrypt-compile opencdk-compile libtasn1-compile
194 irssi-compile: glib-compile ncurses-compile
195 hostapd-compile: openssl-compile
196 kismet-compile: uclibc++-compile libpcap-compile ncurses-compile
197 less-compile: ncurses-compile
198 lcd4linux-compile: ncurses-compile
199 libgcrypt-compile: libgpg-error-compile
200 libgd-compile: libpng-compile
201 libnet-compile: libpcap-compile
202 libnids-compile: libnet-compile
203 libxml2-compile: zlib-compile
204 libxslt-compile: libxml2-compile
205 lighttpd-compile: openssl-compile pcre-compile
206 mini_httpd-compile: matrixssl-compile
207 mt-daapd-compile: howl-compile libgdbm-compile libid3tag-compile
208 mysql-compile: ncurses-compile zlib-compile
209 net-snmp-compile: libelf-compile
210 nfs-server-compile: portmap-compile
211 nmap-compile: uclibc++-compile pcre-compile libpcap-compile
212 nocatsplash-compile: glib-compile
213 opencdk-compile: libgcrypt-compile
214 openldap-compile: cyrus-sasl-compile openssl-compile
215 openssh-compile: zlib-compile openssl-compile
216 openssl-compile: zlib-compile
217 openswan-compile: gmp-compile
218 osiris-compile: openssl-compile
219 portmap-compile: tcp_wrappers-compile
220 postgresql-compile: zlib-compile
221 ppp-compile: linux-atm-compile
222 quagga-compile: readline-compile ncurses-compile
223 rrdcollect-compile: rrdtool-compile
224 rrdtool-compile: cgilib-compile freetype-compile libart-compile libpng-compile
225 rsync-compile: popt-compile
226 samba-compile: cups-compile
227 screen-compile: ncurses-compile
228 siproxd-compile: libosip2-compile
229 sipsak-compile: openssl-compile
230 sqlite-compile: ncurses-compile readline-compile
231 sqlite2-compile: ncurses-compile readline-compile
232 tcpdump-compile: libpcap-compile
233 tinc-compile: zlib-compile openssl-compile lzo-compile
234 tor-compile: libevent-compile openssl-compile zlib-compile
235 usbutils-compile: libusb-compile
236 vtun-compile: zlib-compile openssl-compile lzo-compile
237 wificonf-compile: wireless-tools-compile nvram-compile
238 wpa_supplicant-compile: openssl-compile
239
240 asterisk-compile: bluez-libs-compile ncurses-compile openssl-compile
241 ifneq ($(BR2_PACKAGE_ASTERISK_CODEC_SPEEX),)
242 asterisk-compile: speex-compile
243 endif
244 ifneq ($(BR2_PACKAGE_ASTERISK_PGSQL),)
245 asterisk-compile: postgresql-compile
246 endif
247 ifneq ($(BR2_PACKAGE_ASTERISK_MYSQL),)
248 asterisk-compile: mysql-compile
249 endif
250
251 freeradius-compile: libtool-compile openssl-compile
252 ifneq ($(BR2_PACKAGE_FREERADIUS_MOD_LDAP),)
253 freeradius-compile: openldap-compile
254 endif
255 ifneq ($(BR2_PACKAGE_FREERADIUS_MOD_SQL_MYSQL),)
256 freeradius-compile: mysql-compile
257 endif
258 ifneq ($(BR2_PACKAGE_FREERADIUS_MOD_SQL_PGSQL),)
259 freeradius-compile: postgresql-compile
260 endif
261
262 openvpn-compile: openssl-compile
263 ifeq ($(BR2_PACKAGE_OPENVPN_LZO),y)
264 openvpn-compile: lzo-compile
265 endif
266
267 php4-compile: openssl-compile zlib-compile
268 ifneq ($(BR2_PACKAGE_PHP4_MOD_GD),)
269 php4-compile: libgd-compile libpng-compile
270 endif
271 ifneq ($(BR2_PACKAGE_PHP4_MOD_LDAP),)
272 php4-compile: openldap-compile
273 endif
274 ifneq ($(BR2_PACKAGE_PHP4_MOD_MYSQL),)
275 php4-compile: mysql-compile
276 endif
277 ifneq ($(BR2_PACKAGE_PHP4_MOD_PCRE),)
278 php4-compile: pcre-compile
279 endif
280 ifneq ($(BR2_PACKAGE_PHP4_MOD_PGSQL),)
281 php4-compile: postgresql-compile
282 endif
283 ifneq ($(BR2_PACKAGE_PHP4_MOD_SQLITE),)
284 php4-compile: sqlite2-compile
285 endif
286 ifneq ($(BR2_PACKAGE_PHP4_MOD_XML),)
287 php4-compile: expat-compile
288 endif
289
290 php5-compile: openssl-compile zlib-compile
291 ifneq ($(BR2_PACKAGE_PHP5_MOD_GD),)
292 php5-compile: libgd-compile libpng-compile
293 endif
294 ifneq ($(BR2_PACKAGE_PHP5_MOD_LDAP),)
295 php5-compile: openldap-compile
296 endif
297 ifneq ($(BR2_PACKAGE_PHP5_MOD_MYSQL),)
298 php5-compile: mysql-compile
299 endif
300 ifneq ($(BR2_PACKAGE_PHP5_MOD_PCRE),)
301 php5-compile: pcre-compile
302 endif
303 ifneq ($(BR2_PACKAGE_PHP5_MOD_PGSQL),)
304 php5-compile: postgresql-compile
305 endif
306 ifneq ($(BR2_PACKAGE_PHP5_MOD_SQLITE),)
307 php5-compile: sqlite2-compile
308 endif
309 ifneq ($(BR2_PACKAGE_PHP5_MOD_XML),)
310 php5-compile: expat-compile
311 endif
312
313 pmacct-compile: libpcap-compile
314 ifneq ($(BR2_PACKAGE_PMACCT_MYSQL),)
315 pmacct-compile: mysql-compile
316 endif
317 ifneq ($(BR2_PACKAGE_PMACCT_PGSQL),)
318 pmacct-compile: postgresql-compile
319 endif
320
321 snort-compile: libnet-compile libpcap-compile pcre-compile
322 ifeq ($(BR2_PACKAGE_SNORT_MYSQL),y)
323 snort-compile: mysql-compile
324 endif
325 ifeq ($(BR2_PACKAGE_SNORT_PGSQL),y)
326 snort-compile: postgresql-compile
327 endif
328 ifeq ($(BR2_PACKAGE_SNORT_ENABLE_INLINE),y)
329 snort-compile: iptables-compile
330 endif
331
332 ulogd-compile: iptables-compile
333 ifneq ($(BR2_PACKAGE_ULOGD_MYSQL),)
334 ulogd-compile: mysql-compile
335 endif
336 ifneq ($(BR2_PACKAGE_ULOGD_PGSQL),)
337 ulogd-compile: postgresql-compile
338 endif
339
340 sdk-compile: $(DEV_LIBS_COMPILE) $(SDK_DEFAULT_COMPILE)
341
342 $(STAMP_DIR):
343 mkdir -p $@
344
345 %-prepare: $(STAMP_DIR)
346 @[ -f $(STAMP_DIR)/.$@ ] || $(MAKE) -C $(patsubst %-prepare,%,$@) prepare
347 @touch $(STAMP_DIR)/.$@
348
349 %-compile: %-prepare
350 @[ -f $(STAMP_DIR)/.$@ ] || $(MAKE) -C $(patsubst %-compile,%,$@) compile
351 @touch $(STAMP_DIR)/.$@
352
353 %-install: %-compile
354 @$(MAKE) -C $(patsubst %-install,%,$@) \
355 TARGET_DIR="$(TARGET_DIR)" \
356 IPKG_CONF="$(IPKG_CONF)" \
357 BOARD="$(BOARD)" \
358 install
359
360 %-rebuild:
361 @rm -f $(STAMP_DIR)/.$(patsubst %-rebuild,%,$@)-*
362 $(MAKE) -C $(patsubst %-rebuild,%,$@) rebuild
363
364 %-clean:
365 @$(MAKE) -C $(patsubst %-clean,%,$@) clean
366 @rm -f $(STAMP_DIR)/.$(patsubst %-clean,%,$@)-*
367
This page took 0.057558 seconds and 5 git commands to generate.