+openvpn-compile: openssl-compile
+ifeq ($(BR2_PACKAGE_OPENVPN_LZO),y)
+openvpn-compile: liblzo-compile
+endif
+
+php4-compile: openssl-compile zlib-compile
+ifneq ($(BR2_PACKAGE_PHP4_MOD_CURL),)
+php4-compile: curl-compile
+endif
+ifneq ($(BR2_PACKAGE_PHP4_MOD_GD),)
+php4-compile: libgd-compile libpng-compile
+endif
+ifneq ($(BR2_PACKAGE_PHP4_MOD_GMP),)
+php4-compile: gmp-compile
+endif
+ifneq ($(BR2_PACKAGE_PHP4_MOD_LDAP),)
+php4-compile: openldap-compile
+endif
+ifneq ($(BR2_PACKAGE_PHP4_MOD_MYSQL),)
+php4-compile: mysql-compile
+endif
+ifneq ($(BR2_PACKAGE_PHP4_MOD_PCRE),)
+php4-compile: pcre-compile
+endif
+ifneq ($(BR2_PACKAGE_PHP4_MOD_PGSQL),)
+php4-compile: postgresql-compile
+endif
+ifneq ($(BR2_PACKAGE_PHP4_MOD_SQLITE),)
+php4-compile: sqlite2-compile
+endif
+ifneq ($(BR2_PACKAGE_PHP4_MOD_XML),)
+php4-compile: expat-compile
+endif
+
+php5-compile: openssl-compile zlib-compile
+ifneq ($(BR2_PACKAGE_PHP5_MOD_CURL),)
+php5-compile: curl-compile
+endif
+ifneq ($(BR2_PACKAGE_PHP5_MOD_GD),)
+php5-compile: libgd-compile libpng-compile
+endif
+ifneq ($(BR2_PACKAGE_PHP5_MOD_GMP),)
+php5-compile: gmp-compile
+endif
+ifneq ($(BR2_PACKAGE_PHP5_MOD_LDAP),)
+php5-compile: openldap-compile
+endif
+ifneq ($(BR2_PACKAGE_PHP5_MOD_MYSQL),)
+php5-compile: mysql-compile
+endif
+ifneq ($(BR2_PACKAGE_PHP5_MOD_PCRE),)
+php5-compile: pcre-compile
+endif
+ifneq ($(BR2_PACKAGE_PHP5_MOD_PGSQL),)
+php5-compile: postgresql-compile
+endif
+ifneq ($(BR2_PACKAGE_PHP5_MOD_SQLITE),)
+php5-compile: sqlite2-compile
+endif
+ifneq ($(BR2_PACKAGE_PHP5_MOD_XML),)
+php5-compile: expat-compile
+endif
+
+pmacct-compile: libpcap-compile
+ifneq ($(BR2_COMPILE_PMACCT_MYSQL),)
+pmacct-compile: mysql-compile
+endif
+ifneq ($(BR2_COMPILE_PMACCT_PGSQL),)
+pmacct-compile: postgresql-compile
+endif
+
+rrs-compile: uclibc++-compile
+ifneq ($(BR2_PACKAGE_RRS),)
+rrs-compile: openssl-compile
+endif
+
+snort-compile: libnet-compile libpcap-compile pcre-compile
+ifeq ($(BR2_PACKAGE_SNORT_WITH_MYSQL),y)
+snort-compile: mysql-compile
+endif
+ifeq ($(BR2_PACKAGE_SNORT_WITH_PGSQL),y)
+snort-compile: postgresql-compile
+endif
+ifeq ($(BR2_PACKAGE_SNORT_ENABLE_INLINE),y)
+snort-compile: iptables-compile
+endif
+
+snort-wireless-compile: libnet-compile libpcap-compile pcre-compile
+ifeq ($(BR2_PACKAGE_SNORT_WIRELESS_WITH_MYSQL),y)
+snort-wireless-compile: mysql-compile
+endif
+ifeq ($(BR2_PACKAGE_SNORT_WIRELESS_WITH_PGSQL),y)
+snort-wireless-compile: postgresql-compile
+endif
+ifeq ($(BR2_PACKAGE_SNORT_WIRELESS_ENABLE_INLINE),y)
+snort-wireless-compile: iptables-compile
+endif
+
+ulogd-compile: iptables-compile
+ifneq ($(BR2_PACKAGE_ULOGD_MOD_MYSQL),)
+ulogd-compile: mysql-compile
+endif
+ifneq ($(BR2_PACKAGE_ULOGD_MOD_PGSQL),)
+ulogd-compile: postgresql-compile
+endif
+
+sdk-compile: $(DEV_LIBS_COMPILE) $(SDK_DEFAULT_COMPILE)
+
+$(STAMP_DIR):
+ mkdir -p $@
+
+$(TARGET_DIR):
+ mkdir -p $(TARGET_DIR)
+
+%-prepare: $(STAMP_DIR) $(TARGET_DIR)
+ @[ -f $(STAMP_DIR)/.$@ ] || { \
+ $(START_TRACE) "package/$(patsubst %-prepare,%,$@)/prepare: "; \
+ $(MAKE) -C $(patsubst %-prepare,%,$@) prepare && { \
+ touch $(STAMP_DIR)/.$@; \
+ $(CMD_TRACE) " done"; \
+ $(END_TRACE); \
+ } \
+ }
+
+%-compile:
+ @[ -f $(STAMP_DIR)/.$@ ] || { \
+ $(START_TRACE) "package/$(patsubst %-compile,%,$@)/compile: "; \
+ $(MAKE) -C $(patsubst %-compile,%,$@) compile && { \
+ touch $(STAMP_DIR)/.$(patsubst %-compile,%,$@)-prepare; \
+ touch $(STAMP_DIR)/.$@; \
+ $(CMD_TRACE) " done"; \
+ $(END_TRACE); \
+ } \
+ }