diff --git a/Makefile b/Makefile index 82d317b..9185f68 100644 --- a/Makefile +++ b/Makefile @@ -1,32 +1,19 @@ -BASE_DIR=$(CURDIR) - -# Source and destination directories -export ARCHIVES_DIR=$(BASE_DIR)/archive -export BUILD_DIR=$(BASE_DIR)/compile -export PACKAGES_DIR=$(BASE_DIR)/packages - -# Installation location -export PREFIX=/opt/cross-mint - -# Add search path for cross tools -export PATH:=$(PATH):/opt/cross-mint/bin +include VARS # Default cross compiler -export CC=$(shell which m68k-atari-mint-gcc) +#export CC=$(shell which m68k-atari-mint-gcc) ARCH1=x86_64 ARCH2=i386 ########################################## -export VERSIONBIN=bin-$(shell uname -s | tr "[:upper:]" "[:lower:]") -export VERSIONBINCPU=$(VERSIONBIN)-$(shell uname -m | tr "[:upper:]" "[:lower:]") -export VERSIONBUILD=$(shell date +%Y%m%d) - -########################################## -all: init_dirs binutils mintbin gcc gemlib qed distrib +all: init_dirs binutils mintbin gcc gemlib distrib init_dirs: $(BUILD_DIR) $(PACKAGES_DIR) $(ARCHIVES_DIR) $(PREFIX) clean: +ifeq "$(BUILD_DIR)" "" + @echo "BUILD_DIR is not set" && exit 1 +endif rm -rf "$(BUILD_DIR)" gcc: $(BUILD_DIR)/gcclibs gcc464 diff --git a/Makefile.binutils b/Makefile.binutils index 088f355..a0628f2 100644 --- a/Makefile.binutils +++ b/Makefile.binutils @@ -1,3 +1,5 @@ +include VARS + PACKAGE_NAME=binutils VERSION=2.30 VERSIONPATCH=-mint-20180703 @@ -11,8 +13,7 @@ PACKAGE_FILE=$(PACKAGE_NAME)-$(VERSION)$(VERSIONPATCH)-$(VERSIONBINCPU)-$(VERSIO BINARY_DIR=$(COMPIL_DIR)/binary-package LOCAL_PREFIX_DIR=$(BINARY_DIR)$(PREFIX) -ARCH=x86_64 -CFLAGS="-Wno-error=deprecated-declarations -Wno-error=null-pointer-arithmetic" +CFLAGS=-Wno-error=deprecated-declarations -Wno-error=null-pointer-arithmetic ########################################## .PHONY: all clean extract patch configure compile packaging install @@ -20,6 +21,9 @@ CFLAGS="-Wno-error=deprecated-declarations -Wno-error=null-pointer-arithmetic" all: extract patch configure compile packaging install clean: +ifeq "$(BUILD_DIR)" "" + @echo "BUILD_DIR is not set" && exit 1 +endif rm -rf "$(COMPIL_DIR)" rm -rf "$(SOURCE_DIR)" rm -rf "$(PACKAGES_DIR)/$(PACKAGE_FILE)" @@ -32,7 +36,7 @@ patch: $(SOURCE_DIR)/_patch_$(PACKAGE_NAME) configure: $(COMPIL_DIR)/Makefile compile: - make CFLAGS=$(CFLAGS) --directory="$(COMPIL_DIR)" + make CFLAGS="$(CFLAGS)" --directory="$(COMPIL_DIR)" packaging: $(PACKAGES_DIR)/$(PACKAGE_FILE) diff --git a/Makefile.cflib b/Makefile.cflib index 99b09d9..586634c 100644 --- a/Makefile.cflib +++ b/Makefile.cflib @@ -1,3 +1,5 @@ +include VARS + PACKAGE_NAME=cflib VERSION=Git-$(VERSIONBUILD) VERSIONPATCH=Git-mint-macos @@ -17,6 +19,9 @@ LOCAL_PREFIX_DIR=$(BINARY_DIR)$(PREFIX) all: extract patch configure compile packaging install clean: +ifeq "$(BUILD_DIR)" "" + @echo "BUILD_DIR is not set" && exit 1 +endif rm -rf "$(COMPIL_DIR)" rm -rf "$(SOURCE_DIR)" rm -rf "$(PACKAGES_DIR)/$(PACKAGE_FILE)" diff --git a/Makefile.gcc464 b/Makefile.gcc464 index a903ee4..775271f 100644 --- a/Makefile.gcc464 +++ b/Makefile.gcc464 @@ -1,6 +1,8 @@ +include VARS + PACKAGE_NAME=gcc VERSION=4.6.4 -VERSIONPATCH=-mint-macos +VERSIONPATCH=-mint-macos-20200504 SOURCE_DIR=$(BUILD_DIR)/$(PACKAGE_NAME)-$(VERSION) COMPIL_DIR=$(BUILD_DIR)/$(PACKAGE_NAME)-$(VERSION)$(VERSIONPATCH)-$(VERSIONBINCPU) GIT_SRC= @@ -11,7 +13,6 @@ PACKAGE_FILE=$(PACKAGE_NAME)-$(VERSION)$(VERSIONPATCH)-$(VERSIONBINCPU)-$(VERSIO BINARY_DIR=$(COMPIL_DIR)/binary-package LOCAL_PREFIX_DIR=$(BINARY_DIR)$(PREFIX) -ARCH=x86_64 CFLAGS= ########################################## @@ -20,6 +21,9 @@ CFLAGS= all: extract patch configure compile packaging install clean: +ifeq "$(BUILD_DIR)" "" + @echo "BUILD_DIR is not set" && exit 1 +endif rm -rf "$(COMPIL_DIR)" rm -rf "$(SOURCE_DIR)" rm -rf "$(PACKAGES_DIR)/$(PACKAGE_FILE)" diff --git a/Makefile.gcclibs b/Makefile.gcclibs index d59adab..e346748 100644 --- a/Makefile.gcclibs +++ b/Makefile.gcclibs @@ -1,14 +1,14 @@ +include VARS + PACKAGE_NAME=gcclibs -GMP=gmp-6.2.0 -MPFR=mpfr-4.0.2 -MPC=mpc-1.1.0 +GMP=gmp-6.2.1 +MPFR=mpfr-4.1.0 +MPC=mpc-1.2.1 SOURCE_DIR=$(BUILD_DIR) COMPIL_DIR=$(BUILD_DIR) BINARY_DIR=$(COMPIL_DIR)/gcclibs LOCAL_PREFIX_DIR=$(BINARY_DIR) -ARCH=x86_64 - ########################################## .PHONY: all gmp mpfr mpc diff --git a/Makefile.gemlib b/Makefile.gemlib index 0c7f39a..960be14 100644 --- a/Makefile.gemlib +++ b/Makefile.gemlib @@ -1,3 +1,5 @@ +include VARS + PACKAGE_NAME=gemlib VERSION=Git-$(VERSIONBUILD) VERSIONPATCH= @@ -17,6 +19,9 @@ LOCAL_PREFIX_DIR=$(BINARY_DIR)$(PREFIX) all: extract patch configure compile packaging install clean: +ifeq "$(BUILD_DIR)" "" + @echo "BUILD_DIR is not set" && exit 1 +endif rm -rf "$(COMPIL_DIR)" rm -rf "$(SOURCE_DIR)" rm -rf "$(PACKAGES_DIR)/$(PACKAGE_FILE)" diff --git a/Makefile.gemma b/Makefile.gemma index f7567a3..8e7a26b 100644 --- a/Makefile.gemma +++ b/Makefile.gemma @@ -1,3 +1,5 @@ +include VARS + PACKAGE_NAME=gemma VERSION=Git-$(VERSIONBUILD) VERSIONPATCH= @@ -17,6 +19,9 @@ LOCAL_PREFIX_DIR=$(BINARY_DIR)$(PREFIX) all: extract patch configure compile packaging install clean: +ifeq "$(BUILD_DIR)" "" + @echo "BUILD_DIR is not set" && exit 1 +endif rm -rf "$(COMPIL_DIR)" rm -rf "$(SOURCE_DIR)" rm -rf "$(PACKAGES_DIR)/$(PACKAGE_FILE)" diff --git a/Makefile.mintbin b/Makefile.mintbin index 3752088..3b7f05b 100644 --- a/Makefile.mintbin +++ b/Makefile.mintbin @@ -1,3 +1,5 @@ +include VARS + PACKAGE_NAME=mintbin VERSION=CVS-20110527 VERSIONPATCH= @@ -11,8 +13,7 @@ PACKAGE_FILE=$(PACKAGE_NAME)-$(VERSION)$(VERSIONPATCH)-$(VERSIONBINCPU)-$(VERSIO BINARY_DIR=$(COMPIL_DIR)/binary-package LOCAL_PREFIX_DIR=$(BINARY_DIR)$(PREFIX) -ARCH=x86_64 -CFLAGS=-D_POSIX_SOURCE +CFLAGS=-D_POSIX_SOURCE -Wno-implicit-function-declaration ########################################## .PHONY: all clean extract patch configure compile packaging install @@ -20,11 +21,13 @@ CFLAGS=-D_POSIX_SOURCE all: extract patch configure compile packaging install clean: +ifeq "$(BUILD_DIR)" "" + @echo "BUILD_DIR is not set" && exit 1 +endif rm -rf "$(COMPIL_DIR)" rm -rf "$(SOURCE_DIR)" rm -rf "$(PACKAGES_DIR)/$(PACKAGE_FILE)" - ########################################## extract: $(SOURCE_DIR) @@ -33,7 +36,7 @@ patch: $(SOURCE_DIR)/_patch_$(PACKAGE_NAME) configure: $(COMPIL_DIR)/Makefile compile: - make --directory="$(COMPIL_DIR)" CFLAGS=$(CFLAGS) + make --directory="$(COMPIL_DIR)" CFLAGS="$(CFLAGS)" packaging: $(PACKAGES_DIR)/$(PACKAGE_FILE) @@ -51,7 +54,7 @@ ifneq "$(GIT_SRC)" "" mkdir -p "$(dir $(SOURCE_DIR))" cd "$(dir $(SOURCE_DIR))" && git clone $(GIT_SRC) endif - cp /usr/local/share/automake-1.*/config.* "$(SOURCE_DIR)" + cp $(HOMEBREW_PREFIX)/share/automake-1.*/config.* "$(SOURCE_DIR)" # apply patch to sources @@ -71,7 +74,7 @@ $(COMPIL_DIR)/Makefile: # build distribution package $(PACKAGES_DIR)/$(PACKAGE_FILE): $(COMPIL_DIR)/Makefile - make --directory="$(COMPIL_DIR)" install DESTDIR="$(BINARY_DIR)" CFLAGS=$(CFLAGS) + make --directory="$(COMPIL_DIR)" install DESTDIR="$(BINARY_DIR)" CFLAGS="$(CFLAGS)" rm "$(BINARY_DIR)/"m68k-atari-mint-* rm -rf "$(LOCAL_PREFIX_DIR)/info" mkdir "$(LOCAL_PREFIX_DIR)/bin" diff --git a/Makefile.mintlib b/Makefile.mintlib index ad95610..99f64a0 100644 --- a/Makefile.mintlib +++ b/Makefile.mintlib @@ -1,5 +1,7 @@ +include VARS + PACKAGE_NAME=mintlib -VERSION=Git-20170304 +VERSION=Git-20200504 VERSIONPATCH=-macos SOURCE_DIR=$(BUILD_DIR)/$(PACKAGE_NAME)-$(VERSION) COMPIL_DIR=$(BUILD_DIR)/$(PACKAGE_NAME)-$(VERSION)$(VERSIONPATCH)-$(VERSIONBIN) @@ -27,6 +29,9 @@ endif all: extract patch configure compile packaging install clean: +ifeq "$(BUILD_DIR)" "" + @echo "BUILD_DIR is not set" && exit 1 +endif rm -rf "$(COMPIL_DIR)" rm -rf "$(SOURCE_DIR)" rm -rf "$(PACKAGES_DIR)/$(PACKAGE_FILE)" diff --git a/Makefile.pml b/Makefile.pml index 19c1985..1947271 100644 --- a/Makefile.pml +++ b/Makefile.pml @@ -1,6 +1,8 @@ +include VARS + PACKAGE_NAME=pml VERSION=2.03 -VERSIONPATCH=-mint-20110207 +VERSIONPATCH=-mint-20191013 SOURCE_DIR=$(BUILD_DIR)/$(PACKAGE_NAME)-$(VERSION) COMPIL_DIR=$(BUILD_DIR)/$(PACKAGE_NAME)-$(VERSION)$(VERSIONPATCH)-$(VERSIONBIN) GIT_SRC= @@ -28,6 +30,9 @@ endif all: extract patch configure compile packaging install clean: +ifeq "$(BUILD_DIR)" "" + @echo "BUILD_DIR is not set" && exit 1 +endif rm -rf "$(COMPIL_DIR)" rm -rf "$(SOURCE_DIR)" rm -rf "$(PACKAGES_DIR)/$(PACKAGE_FILE)" diff --git a/Makefile.qed b/Makefile.qed index 2b0877d..360c816 100644 --- a/Makefile.qed +++ b/Makefile.qed @@ -1,3 +1,5 @@ +include VARS + PACKAGE_NAME=qed VERSION=Git-$(VERSIONBUILD) VERSIONPATCH=-mint-macos @@ -17,6 +19,9 @@ LOCAL_PREFIX_DIR=$(BINARY_DIR) all: extract patch configure compile packaging install clean: +ifeq "$(BUILD_DIR)" "" + @echo "BUILD_DIR is not set" && exit 1 +endif rm -rf "$(COMPIL_DIR)" rm -rf "$(SOURCE_DIR)" rm -rf "$(PACKAGES_DIR)/$(PACKAGE_FILE)" diff --git a/VARS b/VARS new file mode 100644 index 0000000..0829e77 --- /dev/null +++ b/VARS @@ -0,0 +1,28 @@ +.EXPORT_ALL_VARIABLES: + +BASE_DIR=$(CURDIR) + +# Source and destination directories +ARCHIVES_DIR=$(BASE_DIR)/archive +BUILD_DIR=$(BASE_DIR)/compile +PACKAGES_DIR=$(BASE_DIR)/packages + +# Installation location +PREFIX=/opt/cross-mint + +# Add search path for cross tools +PATH:=$(PATH):/opt/cross-mint/bin + +# Default host architecture and system +HOSTSYS=$(shell uname -s | tr "[:upper:]" "[:lower:]") +ARCH=x86_64 +#ARCH=$(shell uname -m | tr "[:upper:]" "[:lower:]") + +# Homebrew installation location +HOMEBREW_PREFIX=$(shell brew config | grep HOMEBREW_PREFIX | awk '{print $$2}') + +########################################## +VERSIONBIN=bin-$(HOSTSYS) +VERSIONBINCPU=$(VERSIONBIN)-$(ARCH) +VERSIONBUILD=$(shell date +%Y%m%d) + diff --git a/archive/gcc-4.6.4-mint-macos-20200504.patch.bz2 b/archive/gcc-4.6.4-mint-macos-20200504.patch.bz2 new file mode 100644 index 0000000..32319da Binary files /dev/null and b/archive/gcc-4.6.4-mint-macos-20200504.patch.bz2 differ diff --git a/archive/gcc-4.6.4-mint-macos.patch.bz2 b/archive/gcc-4.6.4-mint-macos.patch.bz2 deleted file mode 100644 index fcc629d..0000000 Binary files a/archive/gcc-4.6.4-mint-macos.patch.bz2 and /dev/null differ diff --git a/archive/mintlib-Git-20170304-macos.patch.bz2 b/archive/mintlib-Git-20200504-macos.patch.bz2 similarity index 100% rename from archive/mintlib-Git-20170304-macos.patch.bz2 rename to archive/mintlib-Git-20200504-macos.patch.bz2