-define Build/ConfigureTarget
- rm -rf $(PKG_BUILD_DIR)/hostapd.$(1)
- mkdir -p $(PKG_BUILD_DIR)/hostapd.$(1)
- $(CP) \
- $(PKG_BUILD_DIR)/hostapd \
- $(PKG_BUILD_DIR)/src \
- $(PKG_BUILD_DIR)/hostapd.$(1)/
- $(CP) ./files/$(1).config $(PKG_BUILD_DIR)/hostapd.$(1)/hostapd/.config
- $(if $(CONFIG_PACKAGE_kmod-mac80211),,$(SED) 's,^CONFIG_DRIVER_NL80211,#CONFIG_DRIVER_NL80211,g' $(PKG_BUILD_DIR)/hostapd.$(1)/hostapd/.config)
- $(if $(CONFIG_PACKAGE_kmod-madwifi),,$(SED) 's,^CONFIG_DRIVER_MADWIFI,#CONFIG_DRIVER_MADWIFI,g' $(PKG_BUILD_DIR)/hostapd.$(1)/hostapd/.config)
-endef
-
-define Build/CompileTarget
- CFLAGS="$(TARGET_CFLAGS) -I$(STAGING_DIR)/usr/include/madwifi -I$(STAGING_DIR)/usr/include/mac80211 -I$(STAGING_DIR)/usr/include/libnl -I$(STAGING_DIR)/usr/include" \
- $(MAKE) -C $(PKG_BUILD_DIR)/hostapd.$(1)/hostapd \
- $(TARGET_CONFIGURE_OPTS) \
- LIBS="$(TARGET_LDFLAGS) -L$(STAGING_DIR)/usr/lib \
- $(if $(CONFIG_PACKAGE_kmod-mac80211),-lm $(STAGING_DIR)/usr/lib/libnl.a) \
- $(if $(findstring default,$(1)),-lssl -lcrypto)" \
- hostapd hostapd_cli
- $(CP) $(PKG_BUILD_DIR)/hostapd.$(1)/hostapd/hostapd_cli $(PKG_BUILD_DIR)/
+define Build/Configure
+ rm -f $(PKG_BUILD_DIR)/hostapd/hostapd
+ rm -f $(PKG_BUILD_DIR)/src/drivers/drivers.o
+ $(CP) ./files/$(BUILD_VARIANT).config $(PKG_BUILD_DIR)/hostapd/.config