Fresh pull from upstream
[librecmc/librecmc.git] / toolchain / yasm / Makefile
1 #
2 # Copyright (C) 2016 Daniel Golle <daniel@makrotopia.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:=yasm
10 PKG_VERSION:=1.3.0
11
12 PKG_SOURCE_URL:=http://www.tortall.net/projects/yasm/releases/
13 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
14
15 PKG_HASH:=3dce6601b495f5b3d45b59f7d2492a340ee7e84b5beca17e48f862502bd5603f
16
17 HOST_BUILD_PARALLEL:=1
18
19 include $(INCLUDE_DIR)/toolchain-build.mk
20
21 YASM_CONFIGURE:= \
22         ./configure \
23                 --prefix=$(TOOLCHAIN_DIR) \
24                 --build=$(GNU_HOST_NAME) \
25                 --host=$(GNU_HOST_NAME) \
26                 --target=$(REAL_GNU_TARGET_NAME) \
27                 --with-sysroot=$(TOOLCHAIN_DIR) \
28                 --disable-multilib \
29                 --disable-werror \
30                 --disable-nls \
31                 --disable-sim \
32                 --disable-gdb \
33                 $(SOFT_FLOAT_CONFIG_OPTION) \
34
35 define Host/Prepare
36         $(call Host/Prepare/Default)
37         ln -snf $(notdir $(HOST_BUILD_DIR)) $(BUILD_DIR_TOOLCHAIN)/$(PKG_NAME)
38         $(CP) $(SCRIPT_DIR)/config.{guess,sub} $(HOST_BUILD_DIR)/
39 endef
40
41 define Host/Configure
42         (cd $(HOST_BUILD_DIR); \
43                 $(YASM_CONFIGURE) \
44         );
45 endef
46
47 define Host/Compile
48         +$(MAKE) $(HOST_JOBS) -C $(HOST_BUILD_DIR) all
49 endef
50
51 define Host/Install
52         $(MAKE) -C $(HOST_BUILD_DIR) \
53                 prefix=$(TOOLCHAIN_DIR) \
54                 install
55 endef
56
57 define Host/Clean
58         rm -rf \
59                 $(HOST_BUILD_DIR) \
60                 $(BUILD_DIR_TOOLCHAIN)/$(PKG_NAME)
61 endef
62
63 $(eval $(call HostBuild))