3 include $(TOPDIR
)/rules.mk
8 PKG_MD5SUM
:=b7f4739ca4758798f8dc3b1ea9fd00d0
10 PKG_SOURCE_URL
:=http
://hostap.epitest.fi
/releases
/
11 PKG_SOURCE
:=$(PKG_NAME
)-$(PKG_VERSION
).
tar.gz
14 PKG_BUILD_DIR
:=$(BUILD_DIR
)/$(PKG_NAME
)-$(PKG_VERSION
)
15 PKG_INSTALL_DIR
:=$(PKG_BUILD_DIR
)/ipkg-install
17 include $(TOPDIR
)/package
/rules.mk
21 ifneq ($(BR2_PACKAGE_
$(1)),)
22 BUILD_TARGETS
+= $(PKG_INSTALL_DIR
)/$(2)/hostapd
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" \
34 mkdir
-p
$(PKG_INSTALL_DIR
)/$(2)
35 $(CP
) $(PKG_BUILD_DIR
)/hostapd
$(PKG_INSTALL_DIR
)/$(2)/
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
)
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
)))
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
)))
55 $(PKG_BUILD_DIR
)/.configured
:
56 $(CP
) .
/files
/hostapd.config
$(PKG_BUILD_DIR
)/.config
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" \
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
)
75 -$(MAKE
) -C
$(PKG_BUILD_DIR
) clean
76 rm -f
$(PKG_BUILD_DIR
)/.built