diff options
author | darealshinji <djcj@gmx.de> | 2018-05-26 15:21:43 (GMT) |
---|---|---|
committer | Tony Theodore <tonyt@logyst.com> | 2018-05-28 05:32:07 (GMT) |
commit | 0d03c560e4b0e42380ed56dad1627d9f85c9dd1e (patch) | |
tree | 3592701ea7bdb1f20bd402fdc217cdd5a43a406d /plugins | |
parent | 8a11ae670f9e447985a7650d9e56cc32ea00cb5b (diff) | |
download | mxe-0d03c560e4b0e42380ed56dad1627d9f85c9dd1e.zip mxe-0d03c560e4b0e42380ed56dad1627d9f85c9dd1e.tar.gz mxe-0d03c560e4b0e42380ed56dad1627d9f85c9dd1e.tar.bz2 |
host-toolchain: build make from source
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/examples/host-toolchain/make-host.mk | 51 | ||||
-rw-r--r-- | plugins/examples/host-toolchain/make-w32-bin.mk | 21 |
2 files changed, 51 insertions, 21 deletions
diff --git a/plugins/examples/host-toolchain/make-host.mk b/plugins/examples/host-toolchain/make-host.mk new file mode 100644 index 0000000..fb89996 --- /dev/null +++ b/plugins/examples/host-toolchain/make-host.mk @@ -0,0 +1,51 @@ +# This file is part of MXE. See LICENSE.md for licensing information. + +PKG := make-host +$(PKG)_IGNORE := +$(PKG)_VERSION := 4.2.1 +$(PKG)_CHECKSUM := d6e262bf3601b42d2b1e4ef8310029e1dcf20083c5446b4b7aa67081fdffc589 +$(PKG)_SUBDIR := make-$($(PKG)_VERSION) +$(PKG)_FILE := make-$($(PKG)_VERSION).tar.bz2 +$(PKG)_URL := https://ftp.gnu.org/gnu/make/$($(PKG)_FILE) +$(PKG)_URL_2 := https://ftpmirror.gnu.org/make/$($(PKG)_FILE) +$(PKG)_DEPS := cc + +define $(PKG)_UPDATE + $(WGET) -q -O- 'https://ftp.gnu.org/gnu/make/?C=M;O=D' | \ + $(SED) -n 's,.*<a href="make-\([0-9][^"]*\)\.tar.*,\1,p' | \ + $(SORT) -V | \ + tail -1 +endef + +$(PKG)_SRCS := ar.c arscan.c commands.c default.c dir.c expand.c file.c \ + function.c getloadavg.c getopt.c getopt1.c glob/fnmatch.c \ + glob/glob.c guile.c hash.c implicit.c job.c load.c loadapi.c \ + main.c misc.c output.c read.c remake.c remote-stub.c rule.c \ + signame.c strcache.c variable.c version.c vpath.c \ + w32/compat/posixfcn.c w32/pathstuff.c w32/subproc/misc.c \ + w32/subproc/sub_proc.c w32/subproc/w32err.c w32/w32os.c + +define $(PKG)_BUILD + cd '$(BUILD_DIR)' && mkdir -p glob w32/compat w32/subproc + cp '$(SOURCE_DIR)/config.h.W32' '$(BUILD_DIR)/config.h' + + $(foreach FILE,$($(PKG)_SRCS),\ + '$(TARGET)-gcc' \ + -mthreads -Wall -std=gnu99 -O2 -DWINDOWS32 -DHAVE_CONFIG_H \ + -I'$(SOURCE_DIR)' \ + -I'$(BUILD_DIR)' \ + -I'$(SOURCE_DIR)/glob' \ + -I'$(SOURCE_DIR)/w32/include' \ + -o '$(BUILD_DIR)/$(FILE).o' \ + -c '$(SOURCE_DIR)/$(FILE)'$(\n)) + + cd '$(BUILD_DIR)' && \ + '$(TARGET)-gcc' \ + -mthreads -Wl,--subsystem,console -s \ + -o '$(BUILD_DIR)/make.exe' \ + $(addsuffix .o,$($(PKG)_SRCS)) -ladvapi32 -luser32 + + $(INSTALL) -d '$(PREFIX)/$(TARGET)/bin' + $(INSTALL) '$(BUILD_DIR)/make.exe' '$(PREFIX)/$(TARGET)/bin/make.exe' +endef + diff --git a/plugins/examples/host-toolchain/make-w32-bin.mk b/plugins/examples/host-toolchain/make-w32-bin.mk deleted file mode 100644 index 722f856..0000000 --- a/plugins/examples/host-toolchain/make-w32-bin.mk +++ /dev/null @@ -1,21 +0,0 @@ -# This file is part of MXE. See LICENSE.md for licensing information. - -PKG := make-w32-bin -$(PKG)_IGNORE := -$(PKG)_VERSION := 4.2.1 -$(PKG)_CHECKSUM := 30641be9602712be76212b99df7209f4f8f518ba764cf564262bc9d6e4047cc7 -$(PKG)_SUBDIR := . -$(PKG)_FILE := make-$($(PKG)_VERSION)-without-guile-w32-bin.zip -$(PKG)_URL := https://$(SOURCEFORGE_MIRROR)/project/ezwinports/$($(PKG)_FILE) -$(PKG)_DEPS := - -define $(PKG)_UPDATE - $(WGET) -q -O- 'https://sourceforge.net/projects/ezwinports/files/' | \ - $(SED) -n 's,.*/make-\([0-9.]*\)-without-guile.*,\1,p' | \ - head -1 -endef - -define $(PKG)_BUILD - cp '$(1)/bin/'* '$(PREFIX)/$(TARGET)/bin/' - cp '$(1)/lib/'* '$(PREFIX)/$(TARGET)/lib/' -endef |