Add weechat, a lightweight IRC client, thanks kolter !
[openwrt.git] / openwrt / package / hostapd / Makefile
1 # $Id$
2
3 include $(TOPDIR)/rules.mk
4
5 PKG_NAME:=hostapd
6 PKG_VERSION:=0.5.2
7 PKG_RELEASE:=1
8 PKG_MD5SUM:=b7f4739ca4758798f8dc3b1ea9fd00d0
9
10 PKG_SOURCE_URL:=http://hostap.epitest.fi/releases/
11 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
12 PKG_CAT:=zcat
13
14 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
15 PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
16
17 include $(TOPDIR)/package/rules.mk
18
19 define PKG_build
20
21 ifneq ($(BR2_PACKAGE_$(1)),)
22 BUILD_TARGETS += $(PKG_INSTALL_DIR)/$(2)/hostapd
23 endif
24
25 $(PKG_INSTALL_DIR)/$(2)/hostapd: $(PKG_BUILD_DIR)/.prepared
26 -$(MAKE) -C $(PKG_BUILD_DIR) clean
27 $(CP) ./files/$(2).config $(PKG_BUILD_DIR)/.config
28 $(MAKE) -C $(PKG_BUILD_DIR) \
29 $(TARGET_CONFIGURE_OPTS) \
30 OPTFLAGS="$(TARGET_CFLAGS)" \
31 CPPFLAGS="-I$(STAGING_DIR)/usr/include -I$(STAGING_DIR)/include -I$(STAGING_DIR)/usr/include/madwifi" \
32 LDFLAGS="-L$(STAGING_DIR)/usr/lib -L$(STAGING_DIR)/lib" \
33 hostapd
34 mkdir -p $(PKG_INSTALL_DIR)/$(2)
35 $(CP) $(PKG_BUILD_DIR)/hostapd $(PKG_INSTALL_DIR)/$(2)/
36 touch $$@
37
38 $$(IPKG_$(1)): $(PKG_INSTALL_DIR)/$(2)/hostapd
39 install -m0755 -d $$(IDIR_$(1))/etc
40 install -m0600 $(PKG_BUILD_DIR)/madwifi.conf $$(IDIR_$(1))/etc/hostapd.conf
41 install -m0755 -d $$(IDIR_$(1))/usr/sbin
42 install -m0755 $(PKG_INSTALL_DIR)/$(2)/hostapd $$(IDIR_$(1))/usr/sbin/
43 $(RSTRIP) $$(IDIR_$(1))
44 $(IPKG_BUILD) $$(IDIR_$(1)) $(PACKAGE_DIR)
45
46 endef
47
48 $(eval $(call PKG_template,HOSTAPD,hostapd,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
49 $(eval $(call PKG_template,HOSTAPD_MINI,hostapd-mini,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
50 $(eval $(call PKG_template,HOSTAPD_UTILS,hostapd-utils,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
51
52 $(eval $(call PKG_build,HOSTAPD,hostapd,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
53 $(eval $(call PKG_build,HOSTAPD_MINI,hostapd-mini,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
54
55 $(PKG_BUILD_DIR)/.configured:
56 $(CP) ./files/hostapd.config $(PKG_BUILD_DIR)/.config
57 touch $@
58
59 $(PKG_BUILD_DIR)/.built: $(BUILD_TARGETS)
60 $(MAKE) -C $(PKG_BUILD_DIR) \
61 $(TARGET_CONFIGURE_OPTS) \
62 OPTFLAGS="$(TARGET_CFLAGS)" \
63 CPPFLAGS="-I$(STAGING_DIR)/usr/include -I$(STAGING_DIR)/include -I$(STAGING_DIR)/usr/include/madwifi" \
64 LDFLAGS="-L$(STAGING_DIR)/usr/lib -L$(STAGING_DIR)/lib" \
65 hostapd_cli
66 touch $@
67
68 $(IPKG_HOSTAPD_UTILS): $(PKG_BUILD_DIR)/.built
69 install -m0755 -d $(IDIR_HOSTAPD_UTILS)/usr/sbin
70 install -m0755 $(PKG_BUILD_DIR)/hostapd_cli $(IDIR_HOSTAPD_UTILS)/usr/sbin/
71 $(RSTRIP) $(IDIR_HOSTAPD_UTILS)
72 $(IPKG_BUILD) $(IDIR_HOSTAPD_UTILS) $(PACKAGE_DIR)
73
74 mostlyclean:
75 -$(MAKE) -C $(PKG_BUILD_DIR) clean
76 rm -f $(PKG_BUILD_DIR)/.built
77
This page took 0.050568 seconds and 5 git commands to generate.