-define Build/CompileTarget
- $(MAKE) -C $(PKG_BUILD_DIR)_$(1) \
- $(TARGET_CONFIGURE_OPTS) \
- OPTFLAGS="$(TARGET_CFLAGS)" \
- CPPFLAGS="$(TARGET_CPPFLAGS) -I$(STAGING_DIR)/usr/include/madwifi -I$(STAGING_DIR)/usr/include/mac80211" \
- LDFLAGS="$(TARGET_LDFLAGS)" \
- hostapd hostapd_cli
- $(CP) $(PKG_BUILD_DIR)_$(1)/hostapd_cli $(PKG_BUILD_DIR)/
-endef
-
-define Package/InstallTemplate
- if [ \! -f "$(PKG_BUILD_DIR)_$(2)/hostapd" ]; then \
- rm -f $(PKG_BUILD_DIR)/.built; \
- $(MAKE) $(PKG_BUILD_DIR)/.built; \
- fi
- $(INSTALL_DIR) $$(1)/lib/wifi
- $(INSTALL_DATA) ./files/hostapd.sh $$(1)/lib/wifi/hostapd.sh
- $(INSTALL_DIR) $$(1)/etc
-ifneq ($(CONFIG_PACKAGE_kmod-madwifi),)
- $(INSTALL_CONF) $(PKG_BUILD_DIR)_$(2)/madwifi.conf $$(1)/etc/hostapd.conf
-else
- $(INSTALL_CONF) $(PKG_BUILD_DIR)_$(2)/hostapd.conf $$(1)/etc/hostapd.conf
-endif
- $(INSTALL_DIR) $$(1)/usr/sbin
- $(INSTALL_BIN) $(PKG_BUILD_DIR)_$(2)/hostapd $$(1)/usr/sbin/