7f212affb3a718596f083e47ddd290747e451139
[openwrt/openwrt.git] / tools / upx / Makefile
1 #
2 # Copyright (C) 2011-2013 OpenWrt.org
3 #
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
6 #
7 include $(TOPDIR)/rules.mk
8
9 PKG_NAME:=upx
10 PKG_VERSION:=3.09
11
12 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-src.tar.bz2
13 PKG_SOURCE_URL:=@SF/upx
14 PKG_MD5SUM:=1253da46eac54a217eb73e2d44818e53
15 PKG_CAT:=bzcat
16
17 HOST_BUILD_DIR:=$(BUILD_DIR_HOST)/$(PKG_NAME)-$(PKG_VERSION)-src
18
19 include $(INCLUDE_DIR)/host-build.mk
20
21 define Host/Compile
22 rm -f $(HOST_BUILD_DIR)/src/.depend
23 $(MAKE) UPX_LZMADIR="$(BUILD_DIR_HOST)/lzma-4.65" -C $(HOST_BUILD_DIR)/src \
24 CXXFLAGS_WERROR="" LDFLAGS="$(HOST_LDFLAGS)" \
25 CXX="$(HOSTCXX)"
26 endef
27
28 define Host/Install
29 $(CP) $(HOST_BUILD_DIR)/src/upx.out $(STAGING_DIR_HOST)/bin/upx
30 endef
31
32 define Host/Clean
33 rm -f $(STAGING_DIR_HOST)/bin/upx
34 endef
35
36 $(eval $(call HostBuild))