summaryrefslogtreecommitdiff
path: root/openwrt/package/olsrd/Makefile
diff options
context:
space:
mode:
authorNicolas Thill <nico@openwrt.org>2005-05-19 22:52:12 +0000
committerNicolas Thill <nico@openwrt.org>2005-05-19 22:52:12 +0000
commite1053660804d608e084d912399ff38ffe1747c20 (patch)
treebcd5d6ce5d3c48867a105267f78265740c939346 /openwrt/package/olsrd/Makefile
parentf6ad530929ba554f0879b1abb86a9a9f441c9c6a (diff)
downloadmtk-20170518-e1053660804d608e084d912399ff38ffe1747c20.zip
mtk-20170518-e1053660804d608e084d912399ff38ffe1747c20.tar.gz
mtk-20170518-e1053660804d608e084d912399ff38ffe1747c20.tar.bz2
Standardize package build (isn't it easier ?)
SVN-Revision: 981
Diffstat (limited to 'openwrt/package/olsrd/Makefile')
-rw-r--r--openwrt/package/olsrd/Makefile27
1 files changed, 14 insertions, 13 deletions
diff --git a/openwrt/package/olsrd/Makefile b/openwrt/package/olsrd/Makefile
index 435c6a2..ffd4b61 100644
--- a/openwrt/package/olsrd/Makefile
+++ b/openwrt/package/olsrd/Makefile
@@ -12,6 +12,7 @@ PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
PKG_CAT:=bzcat
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
+PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
include $(TOPDIR)/package/rules.mk
@@ -19,7 +20,7 @@ define PKG_mod_template
$$(IPKG_$(1)):
install -d -m0755 $$(IDIR_$(1))/usr/lib
- install -m0755 $(PKG_BUILD_DIR)/lib/$(2)*/olsrd_$(2).so.* $$(IDIR_$(1))/usr/lib/
+ install -m0755 $(PKG_INSTALL_DIR)/usr/lib/olsrd_$(2).so.* $$(IDIR_$(1))/usr/lib/
$(RSTRIP) $$(IDIR_$(1))
$(IPKG_BUILD) $$(IDIR_$(1)) $(PACKAGE_DIR)
@@ -41,26 +42,26 @@ $(eval $(call PKG_mod_template,OLSRD_MOD_POWER,power))
$(eval $(call PKG_mod_template,OLSRD_MOD_SECURE,secure))
$(PKG_BUILD_DIR)/.configured:
- touch $(PKG_BUILD_DIR)/.configured
+ touch $@
$(PKG_BUILD_DIR)/.built:
+ rm -rf $(PKG_INSTALL_DIR)
+ mkdir -p $(PKG_INSTALL_DIR)
$(MAKE) -C "$(PKG_BUILD_DIR)" \
+ $(TARGET_CONFIGURE_OPTS) \
+ NODEBUG=1 \
+ OFLAGS="$(TARGET_CFLAGS)" \
OS="linux" \
- CC="$(TARGET_CC)" \
- CFLAGS="$(TARGET_CFLAGS) -DOLSR_PLUGIN -I. -Isrc -Dlinux -I../../src -DNODEBUG" \
- libs
- $(MAKE) -C "$(PKG_BUILD_DIR)" \
- OS="linux" \
- CC="$(TARGET_CC)" \
- CFLAGS="$(TARGET_CFLAGS) -I. -Isrc -Dlinux -I../../src -DNODEBUG" \
- all
- touch $(PKG_BUILD_DIR)/.built
+ INSTALL_PREFIX="$(PKG_INSTALL_DIR)" \
+ STRIP="/bin/true" \
+ all libs install install_libs
+ touch $@
$(IPKG_OLSRD):
install -d -m0755 $(IDIR_OLSRD)/etc
- cp -fpR $(PKG_BUILD_DIR)/files/olsrd.conf.default.rfc $(IDIR_OLSRD)/etc/olsrd.conf
+ cp -fpR $(PKG_INSTALL_DIR)/etc/olsrd.conf $(IDIR_OLSRD)/etc/
install -d -m0755 $(IDIR_OLSRD)/usr/sbin
- cp -fpR $(PKG_BUILD_DIR)/olsrd $(IDIR_OLSRD)/usr/sbin/
+ cp -fpR $(PKG_INSTALL_DIR)/usr/sbin/olsrd $(IDIR_OLSRD)/usr/sbin/
install -d -m0755 $(IDIR_OLSRD)/etc/init.d
cp -fpR ./files/olsrd.init $(IDIR_OLSRD)/etc/init.d/olsrd
$(RSTRIP) $(IDIR_OLSRD)