Simplify configure and add target optimizations,
[openwrt.git] / package / dhcp / Makefile
1 # $Id$
2
3 include $(TOPDIR)/rules.mk
4
5 PKG_NAME:=dhcp
6 PKG_VERSION:=3.0.2
7 PKG_RELEASE:=1
8 PKG_MD5SUM:=04800a111521e7442749b2ce883f962b
9
10 PKG_SOURCE_URL:=ftp://ftp.isc.org/isc/dhcp/
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 $(eval $(call PKG_template,DHCP_RELAY,dhcp-relay,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
20 $(eval $(call PKG_template,DHCP_SERVER,dhcp-server,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
21
22 $(PKG_BUILD_DIR)/.configured: $(PKG_BUILD_DIR)/.prepared
23 (cd $(PKG_BUILD_DIR) ; \
24 ./configure \
25 --copts "$(TARGET_CFLAGS)" \
26 linux-2.2 \
27 );
28 touch $@
29
30 $(PKG_BUILD_DIR)/.built:
31 rm -rf $(PKG_INSTALL_DIR)
32 mkdir -p $(PKG_INSTALL_DIR)
33 $(MAKE) -C $(PKG_BUILD_DIR) \
34 $(TARGET_CONFIGURE_OPTS) \
35 DESTDIR="$(PKG_INSTALL_DIR)" \
36 all install
37 touch $@
38
39 $(IPKG_DHCP_RELAY):
40 install -d -m0755 $(IDIR_DHCP_RELAY)/usr/sbin
41 cp -fpR $(PKG_INSTALL_DIR)/usr/sbin/dhcrelay $(IDIR_DHCP_RELAY)/usr/sbin/
42 $(RSTRIP) $(IDIR_DHCP_RELAY)
43 $(IPKG_BUILD) $(IDIR_DHCP_RELAY) $(PACKAGE_DIR)
44
45 $(IPKG_DHCP_SERVER):
46 install -d -m0755 $(IDIR_DHCP_SERVER)/usr/sbin
47 cp -fpR $(PKG_INSTALL_DIR)/usr/sbin/dhcpd $(IDIR_DHCP_SERVER)/usr/sbin/
48 $(RSTRIP) $(IDIR_DHCP_SERVER)
49 $(IPKG_BUILD) $(IDIR_DHCP_SERVER) $(PACKAGE_DIR)
This page took 0.045732 seconds and 5 git commands to generate.