From 969efab9ce5b5233222f130fbbf5794ce5592508 Mon Sep 17 00:00:00 2001 From: John Hodge Date: Sun, 9 Mar 2014 14:36:19 +0800 Subject: [PATCH] Externals - Cleanup, cross-compiler working > zlib, SDL, dropbear, and bochs compile with the targeted cross-compiler --- Externals/ACPICA/Makefile | 2 +- Externals/ACPICA/Makefile.kinc | 6 +- Externals/bochs/Makefile | 17 ++ Externals/bochs/patches/config.h.in.patch | 6 + Externals/bochs/patches/config.sub.patch | 7 + Externals/{common.mk => common_automake.mk} | 14 +- Externals/config.mk | 6 +- Externals/core.mk | 15 +- Externals/cross-compiler/Makefile | 41 ++--- .../patches/binutils/bfd/config.bfd.patch | 8 +- .../patches/binutils/ld/Makefile.in.patch | 4 +- .../patches/binutils/ld/configure.tgt.patch | 3 +- .../binutils/ld/emulparams/acess2_amd64.sh | 18 ++ .../patches/config/override.m4.patch | 15 ++ .../patches/gcc/gcc/config.gcc.patch | 2 +- .../patches/gcc/gcc/config/acess2.h | 3 +- .../patches/gcc/libgcc/config.host.patch | 4 +- Externals/dropbear/Makefile | 5 +- Externals/dropbear/patches/config.sub.patch | 9 + Externals/sdl12/Makefile | 9 +- Externals/sdl12/patches/configure.in.patch | 167 ------------------ Externals/sdl12/patches/configure.patch | 19 ++ Externals/zlib/Makefile | 4 +- 23 files changed, 159 insertions(+), 225 deletions(-) create mode 100644 Externals/bochs/Makefile create mode 100644 Externals/bochs/patches/config.h.in.patch create mode 100644 Externals/bochs/patches/config.sub.patch rename Externals/{common.mk => common_automake.mk} (62%) create mode 100644 Externals/cross-compiler/patches/binutils/ld/emulparams/acess2_amd64.sh create mode 100644 Externals/cross-compiler/patches/config/override.m4.patch create mode 100644 Externals/dropbear/patches/config.sub.patch delete mode 100644 Externals/sdl12/patches/configure.in.patch create mode 100644 Externals/sdl12/patches/configure.patch diff --git a/Externals/ACPICA/Makefile b/Externals/ACPICA/Makefile index 60c188f3..950f0abd 100644 --- a/Externals/ACPICA/Makefile +++ b/Externals/ACPICA/Makefile @@ -4,7 +4,7 @@ include $(dir $(lastword $(MAKEFILE_LIST)))../../Makefile.cfg ACPI_DEBUG ?= no -BIN := ../bin-$(ARCH)/libacpica.a +BIN := ../Output/$(ARCH)-kernel/libacpica.a _VERS := $(patsubst acpica-unix-%.tar.gz,%,$(wildcard acpica-unix-*.tar.gz)) _VERS := $(sort $(_VERS)) diff --git a/Externals/ACPICA/Makefile.kinc b/Externals/ACPICA/Makefile.kinc index 6410f51b..f42e7957 100644 --- a/Externals/ACPICA/Makefile.kinc +++ b/Externals/ACPICA/Makefile.kinc @@ -1,7 +1,9 @@ +ACPICA_OBJECT := $(ACESSDIR)/Externals/Output/$(ARCH)-kernel/libacpica.a + CPPFLAGS += -I $(ACESSDIR)/Externals/ACPICA/include -D_ACESS -D__KERNEL__ -EXTERN_OBJS += $(ACESSDIR)/Externals/bin-$(ARCH)/libacpica.a +EXTERN_OBJS += $(ACPICA_OBJECT) -$(ACESSDIR)/Externals/bin-$(ARCH)/libacpica.a: +$(ACPICA_OBJECT): @make -C $(ACESSDIR)/Externals/ACPICA @make -C $(ACESSDIR)/Externals/ACPICA diff --git a/Externals/bochs/Makefile b/Externals/bochs/Makefile new file mode 100644 index 00000000..25b85e32 --- /dev/null +++ b/Externals/bochs/Makefile @@ -0,0 +1,17 @@ +# +# Acess2 Externals - bochs +# - Patches and Makefile by John Hodge (thePowersGang) +# + +DEPS := sdl12 cross-compiler +TARBALL_PATTERN := bochs-*.tar.gz +TARBALL_TO_DIR_L := bochs-%.tar.gz +TARBALL_TO_DIR_R := bochs-% +PATCHES := config.h.in config.sub + +#AUTORECONF = yes +CONFIGURE_ARGS := --with-sdl --without-x11 LDFLAGS=-lpsocket + +include ../common_automake.mk + + diff --git a/Externals/bochs/patches/config.h.in.patch b/Externals/bochs/patches/config.h.in.patch new file mode 100644 index 00000000..3e8f8980 --- /dev/null +++ b/Externals/bochs/patches/config.h.in.patch @@ -0,0 +1,6 @@ +--- bochs-2.6.2_orig/config.h.in 2013-06-17 11:39:39.670720710 +0800 ++++ bochs-2.6.2/config.h.in 2013-06-17 11:48:09.149384231 +0800 +@@ -57,2 +57,2 @@ + // Define to 1 if you have +-#define HAVE_LOCALE_H 0 ++#undef HAVE_LOCALE_H diff --git a/Externals/bochs/patches/config.sub.patch b/Externals/bochs/patches/config.sub.patch new file mode 100644 index 00000000..9a3adc36 --- /dev/null +++ b/Externals/bochs/patches/config.sub.patch @@ -0,0 +1,7 @@ +--- bochs-2.6.2_orig/config.sub 2013-06-17 11:39:39.670720710 +0800 ++++ bochs-2.6.2/config.sub 2013-06-17 11:48:09.149384231 +0800 +@@ -1299,2 +1299,3 @@ + | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ ++ | -acess2 \ + | -aos* | -aros* \ + diff --git a/Externals/common.mk b/Externals/common_automake.mk similarity index 62% rename from Externals/common.mk rename to Externals/common_automake.mk index 575c51a9..8f0ba3c7 100644 --- a/Externals/common.mk +++ b/Externals/common_automake.mk @@ -17,16 +17,16 @@ $(warning $(CONFIGSCRIPT): $(PATCHED_ACFILES)) $(CONFIGSCRIPT): $(PATCHED_ACFILES) ifeq ($(AUTORECONF),) else - cd $(DIR) && autoreconf --force --install +# cd $(DIR) && aclocal --force -I acinclude +# cd $(DIR) && libtoolize --force + cd $(DIR) && autoreconf --force --install $(AUTORECONF_ARGS) endif -$(BDIR)/Makefile: _patch $(CONFIGSCRIPT) ../common.mk Makefile +$(BDIR)/Makefile: _patch $(CONFIGSCRIPT) ../common_automake.mk Makefile mkdir -p $(BDIR) - cd $(BDIR) && PATH=$(PREFIX)-BUILD/bin:$(PATH) $(CONFIGURE_LINE) + cd $(BDIR) && $(CONFIGURE_ENV) PATH=$(PATH) $(CONFIGURE_LINE) _build: $(BDIR)/Makefile - cd $(BDIR) && make $(BTARGETS) - -install: all - cd $(BDIR) && make $(ITARGETS) + PATH=$(PATH) make $(BTARGETS) -C $(BDIR) + PATH=$(PATH) make $(ITARGETS) -C $(BDIR) diff --git a/Externals/config.mk b/Externals/config.mk index 5e688b5b..26b9efb8 100644 --- a/Externals/config.mk +++ b/Externals/config.mk @@ -16,5 +16,9 @@ endif PREFIX=$(ACESSDIR)/Externals/Output/$(ARCH) EPREFIX=$(PREFIX) SYSROOT=$(ACESSDIR)/Externals/Output/sysroot-$(BFD) -HOST=$(BFD)-acess_proxy-elf +HOST=$(BFD)-pc-acess2 +PATH:=$(PREFIX)-BUILD/bin:$(PATH) +INCLUDE_DIR=$(SYSROOT)/usr/include + +PARLEVEL ?= 1 diff --git a/Externals/core.mk b/Externals/core.mk index 56d40506..bc7a5b80 100644 --- a/Externals/core.mk +++ b/Externals/core.mk @@ -44,7 +44,7 @@ endif DIR := $(patsubst $(TARBALL_TO_DIR_L),$(TARBALL_TO_DIR_R),$(ARCHIVE)) ifeq ($(NOBDIR),) - BDIR := build-$(DIR) + BDIR := build-$(ARCH) else BDIR := $(DIR) endif @@ -57,14 +57,9 @@ all: $(DIR) _patch _build clean: rm -rf $(DIR) $(BDIR) -$(DIR): $(ARCHIVE) patches/UNIFIED.patch +$(DIR): $(ARCHIVE) tar -xf $(ARCHIVE) -ifneq ($(wildcard patches/UNIFIED.patch),) - cd $(DIR) && patch -p1 < ../patches/UNIFIED.patch -endif -patches/UNIFIED.patch: - $(DIR)/%: patches/%.patch @echo [PATCH] $@ @@ -77,4 +72,8 @@ $(DIR)/%: patches/% @cp $< $@ PATCHED_FILES := $(addprefix $(DIR)/,$(PATCHES)) -_patch: $(DIR) $(PATCHED_FILES) + +_patch: $(DIR) $(PATCHED_FILES) $(wildcard patches/UNIFIED.patch) +ifneq ($(wildcard patches/UNIFIED.patch),) + cd $(DIR) && patch -p1 < ../patches/UNIFIED.patch +endif diff --git a/Externals/cross-compiler/Makefile b/Externals/cross-compiler/Makefile index 52397094..30ebe348 100644 --- a/Externals/cross-compiler/Makefile +++ b/Externals/cross-compiler/Makefile @@ -1,27 +1,23 @@ --include ../../Makefile.cfg + +-include ../config.mk GCC_ARCHIVE:=$(lastword $(sort $(wildcard gcc-*.tar.bz2))) GCC_DIR:=$(GCC_ARCHIVE:%.tar.bz2=%) BINUTILS_ARCHIVE:=$(lastword $(sort $(wildcard binutils-*.tar.bz2))) BINUTILS_DIR:=$(BINUTILS_ARCHIVE:%.tar.bz2=%) -BINUTILS_CHANGES := config.sub bfd/config.bfd gas/configure.tgt ld/configure.tgt ld/emulparams/acess2_i386.sh ld/Makefile.in -GCC_CHANGES := config.sub gcc/config.gcc gcc/config/acess2.h libgcc/config.host - -ifeq ($(ARCH),x86) - BFDARCH:=i586 -else ifeq ($(ARCH),x86_64) - BFDARCH:=x86_64 -else - $(error Arch $(ARCH) is not supported by magic gcc makfile) -endif +BINUTILS_CHANGES := config.sub bfd/config.bfd gas/configure.tgt ld/configure.tgt ld/emulparams/acess2_i386.sh ld/emulparams/acess2_amd64.sh ld/Makefile.in +GCC_CHANGES := config.sub gcc/config.gcc gcc/config/acess2.h libgcc/config.host +# libstdc++-v3/crossconfig.m4 config/override.m4 -PARLEVEL ?= 1 +TARGET=$(HOST) +GCC_TARGETS := gcc target-libgcc +# target-libstdc++-v3 -TARGET=$(BFDARCH)-pc-acess2 -PREFIX=$(shell pwd)/cross -SYSROOT=$(shell pwd)/sysroot-$(ARCH) +PREFIX := $(PREFIX)-BUILD +BDIR_GCC := build-$(ARCH)/gcc +BDIR_BINUTILS := build-$(ARCH)/binutils .PHONY: all clean binutils gcc include @@ -30,8 +26,8 @@ all: include binutils gcc include: mkdir -p $(PREFIX) mkdir -p $(SYSROOT)/usr - -ln -s $(ACESSDIR)/Usermode/include $(SYSROOT)/usr/include - -ln -s $(ACESSDIR)/Usermode/Output/$(ARCH)/Libs $(SYSROOT)/usr/lib + ln -sf $(ACESSDIR)/Usermode/include $(SYSROOT)/usr/include + ln -sf $(ACESSDIR)/Usermode/Output/$(ARCH)/Libs $(SYSROOT)/usr/lib gcc: $(GCC_DIR) $(PREFIX)/bin/$(TARGET)-gcc @@ -60,8 +56,8 @@ $(BINUTILS_DIR)/%: patches/binutils/% @echo [CP] $@ @cp $< $@ -BDIR_GCC := build-$(ARCH)/gcc -BDIR_BINUTILS := build-$(ARCH)/binutils +$(GCC_DIR)/libstdc++-v3/configure: $(GCC_DIR)/libstdc++-v3/crossconfig.m4 + cd $(GCC_DIR)/libstdc++-v3/ && autoconf $(BDIR_BINUTILS)/Makefile: $(addprefix $(BINUTILS_DIR)/,$(BINUTILS_CHANGES)) @mkdir -p $(BDIR_BINUTILS) @@ -71,13 +67,12 @@ $(PREFIX)/bin/$(TARGET)-ld: $(BDIR_BINUTILS)/Makefile @make -C $(BDIR_BINUTILS) all -j $(PARLEVEL) @make -C $(BDIR_BINUTILS) install -$(BDIR_GCC)/Makefile: Makefile $(addprefix $(GCC_DIR)/,$(GCC_CHANGES)) +$(BDIR_GCC)/Makefile: Makefile $(addprefix $(GCC_DIR)/,$(GCC_CHANGES)) $(GCC_DIR)/libstdc++-v3/configure @mkdir -p $(BDIR_GCC) @cd $(BDIR_GCC) && PATH=$(PREFIX)/bin:$$PATH ../../$(GCC_DIR)/configure --target=$(TARGET) --prefix=$(PREFIX) --disable-nls --enable-langs=c,c++ --includedir=$(ACESSDIR)/Usermode/include "--with-sysroot=$(SYSROOT)" $(PREFIX)/bin/$(TARGET)-gcc: $(BDIR_GCC)/Makefile - @PATH=$(PREFIX)/bin:$$PATH make -C $(BDIR_GCC) all-gcc -j $(PARLEVEL) - @PATH=$(PREFIX)/bin:$$PATH make -C $(BDIR_GCC) all-target-libgcc -j $(PARLEVEL) - @make -C $(BDIR_GCC) install-gcc install-target-libgcc + @PATH=$(PREFIX)/bin:$$PATH make -C $(BDIR_GCC) $(GCC_TARGETS:%=all-%) -j $(PARLEVEL) + @PATH=$(PREFIX)/bin:$$PATH make -C $(BDIR_GCC) $(GCC_TARGETS:%=install-%) diff --git a/Externals/cross-compiler/patches/binutils/bfd/config.bfd.patch b/Externals/cross-compiler/patches/binutils/bfd/config.bfd.patch index f3b8d3e3..6b616424 100644 --- a/Externals/cross-compiler/patches/binutils/bfd/config.bfd.patch +++ b/Externals/cross-compiler/patches/binutils/bfd/config.bfd.patch @@ -1,14 +1,18 @@ --- bfd/config.bfd 2011-07-29 00:00:00.000000 +0000 +++ bfd/config.bfd 2013-03-01 10:45:00.000000 +0800 -@@ -1576,2 +1576,11 @@ +@@ -1576,2 +1576,15 @@ ;; + i[3-7]86-*-acess2) + targ_defvec=bfd_elf32_i386_vec -+ targ_selvecs=i386coff_vec ++ targ_selvecs="bfd_elf32_i386_vec i386coff_vec" + ;; + x86_64-*-acess2) + targ_defvec=bfd_elf64_x86_64_vec + targ_selvecs="bfd_elf32_i386_vec bfd_elf32_x86_64_vec i386linux_vec i386pei_vec x86_64pei_vec bfd_elf64_l1om_vec bfd_elf64_k1om_vec" + want64=true ++ ;; ++ arm-*-acess2) ++ targ_defvec=bfd_elf32_arm_vec ++ targ_selvecs="bfd_elf32_arm_vec" + ;; # END OF targmatch.h diff --git a/Externals/cross-compiler/patches/binutils/ld/Makefile.in.patch b/Externals/cross-compiler/patches/binutils/ld/Makefile.in.patch index f47e9f79..76439619 100644 --- a/Externals/cross-compiler/patches/binutils/ld/Makefile.in.patch +++ b/Externals/cross-compiler/patches/binutils/ld/Makefile.in.patch @@ -1,7 +1,9 @@ --- ld/Makefile.in +++ ld/Makefile.in -@@ -2627,2 +2627,4 @@ +@@ -2627,2 +2627,6 @@ ${GENSCRIPTS} elf32xtensa "$(tdir_elf32xtensa)" +eacess2_i386.c: $(srcdir)/emulparams/acess2_i386.sh $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS} + ${GENSCRIPTS} acess2_i386 "$(tdir_acess2_i386)" ++eacess2_amd64.c: $(srcdir)/emulparams/acess2_amd64.sh $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS} ++ ${GENSCRIPTS} acess2_amd64 "$(tdir_acess2_amd64)" eelf_i386.c: $(srcdir)/emulparams/elf_i386.sh \ diff --git a/Externals/cross-compiler/patches/binutils/ld/configure.tgt.patch b/Externals/cross-compiler/patches/binutils/ld/configure.tgt.patch index 828b07c1..8d6a302a 100644 --- a/Externals/cross-compiler/patches/binutils/ld/configure.tgt.patch +++ b/Externals/cross-compiler/patches/binutils/ld/configure.tgt.patch @@ -1,6 +1,7 @@ --- ld/configure.tgt +++ ld/configure.tgt -@@ -167,1 +167,2 @@ +@@ -167,1 +167,3 @@ i[3-7]86-*-nto-qnx*) targ_emul=i386nto ;; +i[3-7]86-*-acess2*) targ_emul=acess2_i386 ;; ++x86_64-*-acess2*) targ_emul=acess2_amd64 ;; diff --git a/Externals/cross-compiler/patches/binutils/ld/emulparams/acess2_amd64.sh b/Externals/cross-compiler/patches/binutils/ld/emulparams/acess2_amd64.sh new file mode 100644 index 00000000..d31dae98 --- /dev/null +++ b/Externals/cross-compiler/patches/binutils/ld/emulparams/acess2_amd64.sh @@ -0,0 +1,18 @@ +SCRIPT_NAME=elf +OUTPUT_FORMAT=elf64-x86_64 +TEXT_START_ADDR=0x00400000 +MAXPAGESIZE="CONSTANT (MAXPAGESIZE)" +COMMONPAGESIZE="CONSTANT (COMMONPAGESIZE)" +TEMPLATE_NAME=elf64 + +ARCH=x86_64 +MACHINE= +NOP=0x90909090 +GENERATE_SHLIB_SCRIPT=yes +GENERATE_PIE_SCRIPT=yes + +NO_SMALL_DATA=yes +SEPARATE_GOTPLT=12 + +ELF_INTERPRETER_NAME=\"/Acess/Libs/ld-acess.so\" + diff --git a/Externals/cross-compiler/patches/config/override.m4.patch b/Externals/cross-compiler/patches/config/override.m4.patch new file mode 100644 index 00000000..ea2aafb8 --- /dev/null +++ b/Externals/cross-compiler/patches/config/override.m4.patch @@ -0,0 +1,15 @@ +--- orig/gcc-4.7.1/config/override.m4 2014-03-08 22:29:42.765585740 +0800 ++++ gcc-4.7.1/config/override.m4 2011-03-05 15:32:50.000000000 +0800 +@@ -39,9 +39,9 @@ + dnl without rewriting this file. + dnl Or for updating the whole tree at once with the definition above. + AC_DEFUN([_GCC_AUTOCONF_VERSION_CHECK], ++[dnl m4_if(m4_defn([_GCC_AUTOCONF_VERSION]), ++ dnl m4_defn([m4_PACKAGE_VERSION]), [], ++ dnl [m4_fatal([Please use exactly Autoconf ]_GCC_AUTOCONF_VERSION[ instead of ]m4_defn([m4_PACKAGE_VERSION])[.])]) +-[m4_if(m4_defn([_GCC_AUTOCONF_VERSION]), +- m4_defn([m4_PACKAGE_VERSION]), [], +- [m4_fatal([Please use exactly Autoconf ]_GCC_AUTOCONF_VERSION[ instead of ]m4_defn([m4_PACKAGE_VERSION])[.])]) + ]) + m4_define([AC_INIT], m4_defn([AC_INIT])[ + _GCC_AUTOCONF_VERSION_CHECK diff --git a/Externals/cross-compiler/patches/gcc/gcc/config.gcc.patch b/Externals/cross-compiler/patches/gcc/gcc/config.gcc.patch index c8545ff0..4a1525f2 100644 --- a/Externals/cross-compiler/patches/gcc/gcc/config.gcc.patch +++ b/Externals/cross-compiler/patches/gcc/gcc/config.gcc.patch @@ -4,7 +4,7 @@ # Common parts for widely ported systems. case ${target} in +*-*-acess2*) -+ extra_parts="crt0.o crtbegin.o crtend.o" ++ extra_parts="crtbegin.o crtend.o" + gas=yes + gnu_ld=yes + default_use_cxa_atexit=yes diff --git a/Externals/cross-compiler/patches/gcc/gcc/config/acess2.h b/Externals/cross-compiler/patches/gcc/gcc/config/acess2.h index c7ca51a9..ec3c1131 100644 --- a/Externals/cross-compiler/patches/gcc/gcc/config/acess2.h +++ b/Externals/cross-compiler/patches/gcc/gcc/config/acess2.h @@ -7,7 +7,8 @@ builtin_assert ("system=unix"); \ } while(0); -#define LIB_SPEC "-lc -lld-acess" +#define LIB_SPEC "-lc -lld-acess -lposix" +#define LIBSTDCXX "c++" /* #undef TARGET_VERSION // note that adding these two lines cause an error in gcc-4.7.0 diff --git a/Externals/cross-compiler/patches/gcc/libgcc/config.host.patch b/Externals/cross-compiler/patches/gcc/libgcc/config.host.patch index 1ad2b3e3..bcf7a4af 100644 --- a/Externals/cross-compiler/patches/gcc/libgcc/config.host.patch +++ b/Externals/cross-compiler/patches/gcc/libgcc/config.host.patch @@ -5,11 +5,11 @@ tmake_file="$tmake_file i386/t-crtstuff t-crtstuff-pic t-libgcc-pic" ;; +i[3-7]86-*-acess2*) -+ extra_parts="crt0.o crtbegin.o crtend.o" ++ extra_parts="crtbegin.o crtend.o" + tmake_file="$tmake_file i386/t-crtstuff" + ;; +x86_64-*-acess2*) -+ extra_parts="crt0.o crtbegin.o crtend.o" ++ extra_parts="crtbegin.o crtend.o" + tmake_file="$tmake_file i386/t-crtstuff t-crtstuff-pic t-libgcc-pic" + ;; i[34567]86-*-freebsd*) diff --git a/Externals/dropbear/Makefile b/Externals/dropbear/Makefile index 2ae2894c..270815c3 100644 --- a/Externals/dropbear/Makefile +++ b/Externals/dropbear/Makefile @@ -7,10 +7,11 @@ DEPS := zlib TARBALL_PATTERN := dropbear-*.tar.bz2 TARBALL_TO_DIR_L := %.tar.bz2 TARBALL_TO_DIR_R := % -PATCHES := options.h +PATCHES := options.h config.sub CONFIGURE_ARGS = --with-zlib=$(PREFIX) --disable-utmp --disable-wtmp --disable-lastlog +CONFIGURE_ENV = LIBS=-lpsocket BTARGETS = dbclient dropbear ITARGETS = inst_dbclient inst_dropbear -include ../common.mk +include ../common_automake.mk diff --git a/Externals/dropbear/patches/config.sub.patch b/Externals/dropbear/patches/config.sub.patch new file mode 100644 index 00000000..cbbd73f5 --- /dev/null +++ b/Externals/dropbear/patches/config.sub.patch @@ -0,0 +1,9 @@ +--- config.sub ++++ config.sub +@@ -1344,3 +1344,6 @@ + os=-mint + ;; ++ -acess2) ++ os=-acess2 ++ ;; + -aros*) diff --git a/Externals/sdl12/Makefile b/Externals/sdl12/Makefile index 6ee50f87..30c17db7 100644 --- a/Externals/sdl12/Makefile +++ b/Externals/sdl12/Makefile @@ -7,9 +7,10 @@ DEPS := TARBALL_PATTERN := SDL-*.tar.gz TARBALL_TO_DIR_L := %.tar.gz TARBALL_TO_DIR_R := % -PATCHES := configure.in src/video/acess/ptyvideo.c src/video/SDL_video.c src/video/SDL_sysvideo.h -CONFIGURE_ARGS = -AUTORECONF = yes +PATCHES := configure build-scripts/config.sub +PATCHES += src/video/acess/ptyvideo.c src/video/SDL_video.c src/video/SDL_sysvideo.h +CONFIGURE_ARGS = --includedir=$(INCLUDEDIR) --bindir=$(PREFIX)-BUILD/bin/ +#AUTORECONF = yes -include ../common.mk +include ../common_automake.mk diff --git a/Externals/sdl12/patches/configure.in.patch b/Externals/sdl12/patches/configure.in.patch deleted file mode 100644 index df2154d7..00000000 --- a/Externals/sdl12/patches/configure.in.patch +++ /dev/null @@ -1,167 +0,0 @@ ---- SDL-1.2.15_orig/configure.in 2013-06-17 11:39:39.670720710 +0800 -+++ SDL-1.2.15/configure.in 2013-06-17 11:48:09.149384231 +0800 -@@ -43,6 +43,147 @@ - AC_SUBST(LT_REVISION) - AC_SUBST(LT_AGE) - -+AH_TEMPLATE(HAVE_ALTIVEC_H, []) -+AH_TEMPLATE(HAVE_CLOCK_GETTIME, []) -+AH_TEMPLATE(HAVE_LIBC, []) -+AH_TEMPLATE(HAVE_MEMCMP, []) -+AH_TEMPLATE(HAVE_MPROTECT, []) -+AH_TEMPLATE(HAVE_SA_SIGACTION, []) -+AH_TEMPLATE(HAVE_SEM_TIMEDWAIT, []) -+AH_TEMPLATE(HAVE_STRTOD, []) -+AH_TEMPLATE(SDL_ALTIVEC_BLITTERS, []) -+AH_TEMPLATE(SDL_ASSEMBLY_ROUTINES, []) -+AH_TEMPLATE(SDL_AUDIO_DISABLED, []) -+AH_TEMPLATE(SDL_AUDIO_DRIVER_ALSA, []) -+AH_TEMPLATE(SDL_AUDIO_DRIVER_ALSA_DYNAMIC, []) -+AH_TEMPLATE(SDL_AUDIO_DRIVER_ARTS, []) -+AH_TEMPLATE(SDL_AUDIO_DRIVER_ARTS_DYNAMIC, []) -+AH_TEMPLATE(SDL_AUDIO_DRIVER_BAUDIO, []) -+AH_TEMPLATE(SDL_AUDIO_DRIVER_BSD, []) -+AH_TEMPLATE(SDL_AUDIO_DRIVER_COREAUDIO, []) -+AH_TEMPLATE(SDL_AUDIO_DRIVER_DISK, []) -+AH_TEMPLATE(SDL_AUDIO_DRIVER_DMEDIA, []) -+AH_TEMPLATE(SDL_AUDIO_DRIVER_DSOUND, []) -+AH_TEMPLATE(SDL_AUDIO_DRIVER_DUMMY, []) -+AH_TEMPLATE(SDL_AUDIO_DRIVER_ESD, []) -+AH_TEMPLATE(SDL_AUDIO_DRIVER_ESD_DYNAMIC, []) -+AH_TEMPLATE(SDL_AUDIO_DRIVER_MINT, []) -+AH_TEMPLATE(SDL_AUDIO_DRIVER_MMEAUDIO, []) -+AH_TEMPLATE(SDL_AUDIO_DRIVER_NAS, []) -+AH_TEMPLATE(SDL_AUDIO_DRIVER_NAS_DYNAMIC, []) -+AH_TEMPLATE(SDL_AUDIO_DRIVER_OSS, []) -+AH_TEMPLATE(SDL_AUDIO_DRIVER_OSS_SOUNDCARD_H, []) -+AH_TEMPLATE(SDL_AUDIO_DRIVER_PAUD, []) -+AH_TEMPLATE(SDL_AUDIO_DRIVER_PULSE, []) -+AH_TEMPLATE(SDL_AUDIO_DRIVER_PULSE_DYNAMIC, []) -+AH_TEMPLATE(SDL_AUDIO_DRIVER_QNXNTO, []) -+AH_TEMPLATE(SDL_AUDIO_DRIVER_SUNAUDIO, []) -+AH_TEMPLATE(SDL_AUDIO_DRIVER_WAVEOUT, []) -+AH_TEMPLATE(SDL_BYTEORDER, []) -+AH_TEMPLATE(SDL_CDROM_AIX, []) -+AH_TEMPLATE(SDL_CDROM_BEOS, []) -+AH_TEMPLATE(SDL_CDROM_BSDI, []) -+AH_TEMPLATE(SDL_CDROM_DISABLED, []) -+AH_TEMPLATE(SDL_CDROM_FREEBSD, []) -+AH_TEMPLATE(SDL_CDROM_LINUX, []) -+AH_TEMPLATE(SDL_CDROM_MACOSX, []) -+AH_TEMPLATE(SDL_CDROM_MINT, []) -+AH_TEMPLATE(SDL_CDROM_OPENBSD, []) -+AH_TEMPLATE(SDL_CDROM_OSF, []) -+AH_TEMPLATE(SDL_CDROM_QNX, []) -+AH_TEMPLATE(SDL_CDROM_WIN32, []) -+AH_TEMPLATE(SDL_CPUINFO_DISABLED, []) -+AH_TEMPLATE(SDL_EVENTS_DISABLED, []) -+AH_TEMPLATE(SDL_FILE_DISABLED, []) -+AH_TEMPLATE(SDL_HAS_64BIT_TYPE, []) -+AH_TEMPLATE(SDL_HERMES_BLITTERS, []) -+AH_TEMPLATE(SDL_INPUT_LINUXEV, []) -+AH_TEMPLATE(SDL_INPUT_TSLIB, []) -+AH_TEMPLATE(SDL_JOYSTICK_BEOS, []) -+AH_TEMPLATE(SDL_JOYSTICK_DISABLED, []) -+AH_TEMPLATE(SDL_JOYSTICK_DUMMY, []) -+AH_TEMPLATE(SDL_JOYSTICK_IOKIT, []) -+AH_TEMPLATE(SDL_JOYSTICK_LINUX, []) -+AH_TEMPLATE(SDL_JOYSTICK_MINT, []) -+AH_TEMPLATE(SDL_JOYSTICK_RISCOS, []) -+AH_TEMPLATE(SDL_JOYSTICK_USBHID, []) -+AH_TEMPLATE(SDL_JOYSTICK_USBHID_MACHINE_JOYSTICK_H, []) -+AH_TEMPLATE(SDL_JOYSTICK_WINMM, []) -+AH_TEMPLATE(SDL_LOADSO_BEOS, []) -+AH_TEMPLATE(SDL_LOADSO_DISABLED, []) -+AH_TEMPLATE(SDL_LOADSO_DLCOMPAT, []) -+AH_TEMPLATE(SDL_LOADSO_DLOPEN, []) -+AH_TEMPLATE(SDL_LOADSO_LDG, []) -+AH_TEMPLATE(SDL_LOADSO_WIN32, []) -+AH_TEMPLATE(SDL_THREADS_DISABLED, []) -+AH_TEMPLATE(SDL_THREAD_BEOS, []) -+AH_TEMPLATE(SDL_THREAD_PTH, []) -+AH_TEMPLATE(SDL_THREAD_PTHREAD, []) -+AH_TEMPLATE(SDL_THREAD_PTHREAD_RECURSIVE_MUTEX, []) -+AH_TEMPLATE(SDL_THREAD_PTHREAD_RECURSIVE_MUTEX_NP, []) -+AH_TEMPLATE(SDL_THREAD_SPROC, []) -+AH_TEMPLATE(SDL_THREAD_WIN32, []) -+AH_TEMPLATE(SDL_TIMERS_DISABLED, []) -+AH_TEMPLATE(SDL_TIMER_BEOS, []) -+AH_TEMPLATE(SDL_TIMER_MINT, []) -+AH_TEMPLATE(SDL_TIMER_RISCOS, []) -+AH_TEMPLATE(SDL_TIMER_UNIX, []) -+AH_TEMPLATE(SDL_TIMER_WIN32, []) -+AH_TEMPLATE(SDL_TIMER_WINCE, []) -+AH_TEMPLATE(SDL_VIDEO_DISABLED, []) -+AH_TEMPLATE(SDL_VIDEO_DISABLE_SCREENSAVER, []) -+AH_TEMPLATE(SDL_VIDEO_DRIVER_AALIB, []) -+AH_TEMPLATE(SDL_VIDEO_DRIVER_ACESS, []) -+AH_TEMPLATE(SDL_VIDEO_DRIVER_BWINDOW, []) -+AH_TEMPLATE(SDL_VIDEO_DRIVER_CACA, []) -+AH_TEMPLATE(SDL_VIDEO_DRIVER_DDRAW, []) -+AH_TEMPLATE(SDL_VIDEO_DRIVER_DGA, []) -+AH_TEMPLATE(SDL_VIDEO_DRIVER_DIRECTFB, []) -+AH_TEMPLATE(SDL_VIDEO_DRIVER_DUMMY, []) -+AH_TEMPLATE(SDL_VIDEO_DRIVER_FBCON, []) -+AH_TEMPLATE(SDL_VIDEO_DRIVER_GEM, []) -+AH_TEMPLATE(SDL_VIDEO_DRIVER_GGI, []) -+AH_TEMPLATE(SDL_VIDEO_DRIVER_IPOD, []) -+AH_TEMPLATE(SDL_VIDEO_DRIVER_NANOX, []) -+AH_TEMPLATE(SDL_VIDEO_DRIVER_PHOTON, []) -+AH_TEMPLATE(SDL_VIDEO_DRIVER_PICOGUI, []) -+AH_TEMPLATE(SDL_VIDEO_DRIVER_PS2GS, []) -+AH_TEMPLATE(SDL_VIDEO_DRIVER_PS3, []) -+AH_TEMPLATE(SDL_VIDEO_DRIVER_QTOPIA, []) -+AH_TEMPLATE(SDL_VIDEO_DRIVER_QUARTZ, []) -+AH_TEMPLATE(SDL_VIDEO_DRIVER_RISCOS, []) -+AH_TEMPLATE(SDL_VIDEO_DRIVER_SVGALIB, []) -+AH_TEMPLATE(SDL_VIDEO_DRIVER_TOOLBOX, []) -+AH_TEMPLATE(SDL_VIDEO_DRIVER_VGL, []) -+AH_TEMPLATE(SDL_VIDEO_DRIVER_WINDIB, []) -+AH_TEMPLATE(SDL_VIDEO_DRIVER_WSCONS, []) -+AH_TEMPLATE(SDL_VIDEO_DRIVER_X11, []) -+AH_TEMPLATE(SDL_VIDEO_DRIVER_X11_DGAMOUSE, []) -+AH_TEMPLATE(SDL_VIDEO_DRIVER_X11_DYNAMIC, []) -+AH_TEMPLATE(SDL_VIDEO_DRIVER_X11_DYNAMIC_XEXT, []) -+AH_TEMPLATE(SDL_VIDEO_DRIVER_X11_DYNAMIC_XRANDR, []) -+AH_TEMPLATE(SDL_VIDEO_DRIVER_X11_DYNAMIC_XRENDER, []) -+AH_TEMPLATE(SDL_VIDEO_DRIVER_X11_VIDMODE, []) -+AH_TEMPLATE(SDL_VIDEO_DRIVER_X11_XINERAMA, []) -+AH_TEMPLATE(SDL_VIDEO_DRIVER_X11_XME, []) -+AH_TEMPLATE(SDL_VIDEO_DRIVER_X11_XRANDR, []) -+AH_TEMPLATE(SDL_VIDEO_DRIVER_X11_XV, []) -+AH_TEMPLATE(SDL_VIDEO_DRIVER_XBIOS, []) -+AH_TEMPLATE(SDL_VIDEO_OPENGL, []) -+AH_TEMPLATE(SDL_VIDEO_OPENGL_GLX, []) -+AH_TEMPLATE(SDL_VIDEO_OPENGL_OSMESA, []) -+AH_TEMPLATE(SDL_VIDEO_OPENGL_OSMESA_DYNAMIC, []) -+AH_TEMPLATE(SDL_VIDEO_OPENGL_WGL, []) -+AH_TEMPLATE(int8_t, [Signed 8-bit int]) -+AH_TEMPLATE(int16_t, [Signed 16-bit int]) -+AH_TEMPLATE(int32_t, [Signed 32-bit int]) -+AH_TEMPLATE(int64_t, [Signed 64-bit int]) -+AH_TEMPLATE(uint8_t, [Unigned 8-bit int]) -+AH_TEMPLATE(uint16_t, [Unigned 16-bit int]) -+AH_TEMPLATE(uint32_t, [Unigned 32-bit int]) -+AH_TEMPLATE(uint64_t, [Unigned 64-bit int]) -+AH_TEMPLATE(uintptr_t, [Unsigned pointer-sized integer]) -+ - dnl Detect the canonical build and host environments - AC_CONFIG_AUX_DIR([build-scripts]) - dnl AC_CANONICAL_HOST -@@ -2831,6 +2972,16 @@ - # The RISC OS platform requires special setup. - EXTRA_LDFLAGS="$EXTRA_LDFLAGS -ljpeg -ltiff -lpng -lz" - ;; -+ *-acess*) -+ ARCH=acess -+ # Set up files for the video library -+ if test x$enable_video = xyes; then -+ AC_DEFINE(SDL_VIDEO_DRIVER_ACESS) -+ SOURCES="$SOURCES $srcdir/src/video/acess/*.c" -+ have_video=yes -+ fi -+ # TODO: Joystick -+ ;; - *) - AC_MSG_ERROR([ - *** Unsupported host: Please add to configure.in diff --git a/Externals/sdl12/patches/configure.patch b/Externals/sdl12/patches/configure.patch new file mode 100644 index 00000000..234ab6b3 --- /dev/null +++ b/Externals/sdl12/patches/configure.patch @@ -0,0 +1,19 @@ +--- configure ++++ configure +@@ -30162,4 +30162,16 @@ + # The RISC OS platform requires special setup. + EXTRA_LDFLAGS="$EXTRA_LDFLAGS -ljpeg -ltiff -lpng -lz" + ;; ++ *-acess*) ++ ARCH=acess ++ # Set up files for the video library ++ if test x$enable_video = xyes; then ++ cat >>confdefs.h <<\_ACEOF ++#define SDL_VIDEO_DRIVER_ACESS 1 ++_ACEOF ++ SOURCES="$SOURCES $srcdir/src/video/acess/*.c" ++ have_video=yes ++ fi ++ # TODO: Joystick ++ ;; + *) diff --git a/Externals/zlib/Makefile b/Externals/zlib/Makefile index 01e6c498..7f14e628 100644 --- a/Externals/zlib/Makefile +++ b/Externals/zlib/Makefile @@ -8,8 +8,8 @@ TARBALL_PATTERN := zlib-*.tar.gz TARBALL_TO_DIR_L := %.tar.gz TARBALL_TO_DIR_R := % PATCHES := -CONFIGURE_LINE = CC=$(HOST)-gcc $(SDIR)/configure --static --prefix=$(PREFIX) --eprefix=$(EPREFIX) +CONFIGURE_LINE = CC=$(HOST)-gcc $(SDIR)/configure --static --prefix=$(PREFIX) --eprefix=$(EPREFIX) --includedir=$(INCLUDE_DIR) NOBDIR = yes -include ../common.mk +include ../common_automake.mk -- 2.20.1