aboutsummaryrefslogtreecommitdiffstats
path: root/package/hostapd/Makefile
diff options
context:
space:
mode:
authorNicolas Thill <nico@openwrt.org>2006-04-01 14:40:44 +0000
committerNicolas Thill <nico@openwrt.org>2006-04-01 14:40:44 +0000
commit8b78b92a74a0412efaf0970db67ddeda300d68aa (patch)
treea511d1b9c63853080a102f75460eb3ad65efc519 /package/hostapd/Makefile
parent72d045c6518abf188b79e5011a2fb4ac3ec23c1c (diff)
downloadmaster-187ad058-8b78b92a74a0412efaf0970db67ddeda300d68aa.tar.gz
master-187ad058-8b78b92a74a0412efaf0970db67ddeda300d68aa.tar.bz2
master-187ad058-8b78b92a74a0412efaf0970db67ddeda300d68aa.zip
add an hostapd-mini package with WPA support only, and move hostapd_cli in a
separate hostapd-utils package. git-svn-id: svn://svn.openwrt.org/openwrt/trunk/openwrt@3564 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'package/hostapd/Makefile')
-rw-r--r--package/hostapd/Makefile61
1 files changed, 46 insertions, 15 deletions
diff --git a/package/hostapd/Makefile b/package/hostapd/Makefile
index f801256956..ac45e7f7bc 100644
--- a/package/hostapd/Makefile
+++ b/package/hostapd/Makefile
@@ -16,31 +16,62 @@ PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
include $(TOPDIR)/package/rules.mk
+define PKG_build
+
+ifneq ($(BR2_PACKAGE_$(1)),)
+BUILD_TARGETS += $(PKG_INSTALL_DIR)/$(2)/hostapd
+endif
+
+$(PKG_INSTALL_DIR)/$(2)/hostapd: $(PKG_BUILD_DIR)/.prepared
+ -$(MAKE) -C $(PKG_BUILD_DIR) clean
+ $(CP) ./files/$(2).config $(PKG_BUILD_DIR)/.config
+ $(MAKE) -C $(PKG_BUILD_DIR) \
+ $(TARGET_CONFIGURE_OPTS) \
+ OPTFLAGS="$(TARGET_CFLAGS)" \
+ CPPFLAGS="-I$(STAGING_DIR)/usr/include -I$(STAGING_DIR)/include -I$(STAGING_DIR)/usr/include/madwifi" \
+ LDFLAGS="-L$(STAGING_DIR)/usr/lib -L$(STAGING_DIR)/lib" \
+ hostapd
+ mkdir -p $(PKG_INSTALL_DIR)/$(2)
+ $(CP) $(PKG_BUILD_DIR)/hostapd $(PKG_INSTALL_DIR)/$(2)/
+ touch $$@
+
+$$(IPKG_$(1)): $(PKG_INSTALL_DIR)/$(2)/hostapd
+ install -m0755 -d $$(IDIR_$(1))/etc
+ install -m0600 $(PKG_BUILD_DIR)/madwifi.conf $$(IDIR_$(1))/etc/hostapd.conf
+ install -m0755 -d $$(IDIR_$(1))/usr/sbin
+ install -m0755 $(PKG_INSTALL_DIR)/$(2)/hostapd $$(IDIR_$(1))/usr/sbin/
+ $(RSTRIP) $$(IDIR_$(1))
+ $(IPKG_BUILD) $$(IDIR_$(1)) $(PACKAGE_DIR)
+
+endef
+
$(eval $(call PKG_template,HOSTAPD,hostapd,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
+$(eval $(call PKG_template,HOSTAPD_MINI,hostapd-mini,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
+$(eval $(call PKG_template,HOSTAPD_UTILS,hostapd-utils,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
+
+$(eval $(call PKG_build,HOSTAPD,hostapd,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
+$(eval $(call PKG_build,HOSTAPD_MINI,hostapd-mini,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
$(PKG_BUILD_DIR)/.configured:
- $(CP) ./files/config $(PKG_BUILD_DIR)/.config
+ $(CP) ./files/hostapd.config $(PKG_BUILD_DIR)/.config
touch $@
-$(PKG_BUILD_DIR)/.built:
+$(PKG_BUILD_DIR)/.built: $(BUILD_TARGETS)
$(MAKE) -C $(PKG_BUILD_DIR) \
$(TARGET_CONFIGURE_OPTS) \
OPTFLAGS="$(TARGET_CFLAGS)" \
- CPPFLAGS="-I$(STAGING_DIR)/usr/include -I$(STAGING_DIR)/usr/include/madwifi" \
- LDFLAGS="-L$(STAGING_DIR)/lib -L$(STAGING_DIR)/usr/lib" \
- all
+ CPPFLAGS="-I$(STAGING_DIR)/usr/include -I$(STAGING_DIR)/include -I$(STAGING_DIR)/usr/include/madwifi" \
+ LDFLAGS="-L$(STAGING_DIR)/usr/lib -L$(STAGING_DIR)/lib" \
+ hostapd_cli
touch $@
-$(IPKG_HOSTAPD):
- install -m0755 -d $(IDIR_HOSTAPD)/etc
- install -m0600 $(PKG_BUILD_DIR)/madwifi.conf $(IDIR_HOSTAPD)/etc/hostapd.conf
- install -m0755 -d $(IDIR_HOSTAPD)/usr/sbin
- install -m0755 $(PKG_BUILD_DIR)/hostapd $(IDIR_HOSTAPD)/usr/sbin/
- install -m0755 $(PKG_BUILD_DIR)/hostapd_cli $(IDIR_HOSTAPD)/usr/sbin/
- $(RSTRIP) $(IDIR_HOSTAPD)
- $(IPKG_BUILD) $(IDIR_HOSTAPD) $(PACKAGE_DIR)
+$(IPKG_HOSTAPD_UTILS): $(PKG_BUILD_DIR)/.built
+ install -m0755 -d $(IDIR_HOSTAPD_UTILS)/usr/sbin
+ install -m0755 $(PKG_BUILD_DIR)/hostapd_cli $(IDIR_HOSTAPD_UTILS)/usr/sbin/
+ $(RSTRIP) $(IDIR_HOSTAPD_UTILS)
+ $(IPKG_BUILD) $(IDIR_HOSTAPD_UTILS) $(PACKAGE_DIR)
mostlyclean:
- make -C $(PKG_BUILD_DIR) clean
- rm $(PKG_BUILD_DIR)/.built
+ -$(MAKE) -C $(PKG_BUILD_DIR) clean
+ rm -f $(PKG_BUILD_DIR)/.built