From d540f18ef4c76b09770e0a0e1ad6e271ac3ea729 Mon Sep 17 00:00:00 2001 From: helixhorned Date: Tue, 11 Oct 2011 16:53:52 +0000 Subject: [PATCH] OSX build: don't include startup window (where the hell is the nib file?); makefile bits for libpng from maxports (dynamically linked, not enabled); update osxbuild.sh so that the 64-bit build links (statically) to libvpx git-svn-id: https://svn.eduke32.com/eduke32@2076 1a8010ca-5511-0410-912e-c29ae57300e0 --- polymer/eduke32/Makefile.common | 4 ++-- polymer/eduke32/build/Makefile | 13 +++++++++---- polymer/eduke32/build/Makefile.shared | 4 ++-- polymer/eduke32/build/src/sdlayer.c | 2 +- polymer/eduke32/osxbuild.sh | 6 +++--- 5 files changed, 17 insertions(+), 12 deletions(-) diff --git a/polymer/eduke32/Makefile.common b/polymer/eduke32/Makefile.common index 245c69068..d6b110bfb 100644 --- a/polymer/eduke32/Makefile.common +++ b/polymer/eduke32/Makefile.common @@ -23,8 +23,8 @@ LINKED_GTK = 0 BUILD32_ON_64 ?= 0 # DO NOT SET THIS TO 1 AND COMMIT IT. NEDMALLOC = 0 -USE_LIBPNG = 0 -USE_LIBVPX = 1 +USE_LIBPNG ?= 0 +USE_LIBVPX ?= 1 ifeq (0,$(USE_OPENGL)) POLYMER = 0 diff --git a/polymer/eduke32/build/Makefile b/polymer/eduke32/build/Makefile index 9ab366ad7..8864f7244 100644 --- a/polymer/eduke32/build/Makefile +++ b/polymer/eduke32/build/Makefile @@ -65,6 +65,12 @@ endif ifneq ($(PLATFORM),WINDOWS) LIBS+= -ldl -pthread endif +ifeq ($(PLATFORM),DARWIN) + ifneq ($(USE_LIBPNG),0) + OURCFLAGS+= -I/opt/local/include + LIBS+= -L/opt/local/lib -lpng + endif +endif ENGINEOBJS+= \ @@ -109,12 +115,11 @@ ifeq ($(PLATFORM),LINUX) endif ifeq ($(PLATFORM),DARWIN) ifneq ($(findstring ppc,$(ARCH)),ppc) - ENGINEOBJS += $(OBJ)/StartupWinController.editor.$o +# ENGINEOBJS += $(OBJ)/StartupWinController.editor.$o endif ENGINEOBJS += $(OBJ)/osxbits.$o - ASFLAGS += -DUNDERSCORES -f macho - OURCFLAGS += -DUNDERSCORES -fno-pic - TARGETOPTS += -DNOASM + ASFLAGS += -f macho -DUNDERSCORES + OURCFLAGS += -fno-pic -DUNDERSCORES endif ifeq ($(PLATFORM),BSD) ASFLAGS+= -f elf diff --git a/polymer/eduke32/build/Makefile.shared b/polymer/eduke32/build/Makefile.shared index 79cce7c73..98e662788 100644 --- a/polymer/eduke32/build/Makefile.shared +++ b/polymer/eduke32/build/Makefile.shared @@ -94,16 +94,16 @@ ifeq ($(PLATFORM),LINUX) endif ifeq ($(PLATFORM),DARWIN) RENDERTYPE = SDL - BUILDCFLAGS += -DHAVE_INTTYPES + BUILDCFLAGS += -DHAVE_INTTYPES #-fno-leading-underscore GTKCOMPAT32 = 0 SDL_FRAMEWORK = 1 ifeq (1,$(BUILD32_ON_64)) BUILDCFLAGS += $(F_NO_STACK_PROTECTOR) -arch i386 else - # ASM won't work on PowerPC or x86_64 ifeq ($(findstring ppc,$(ARCH)),ppc) BUILDCFLAGS += $(F_NO_STACK_PROTECTOR) endif + # ASM won't work on PowerPC or x86_64 override NOASM = 1 endif endif diff --git a/polymer/eduke32/build/src/sdlayer.c b/polymer/eduke32/build/src/sdlayer.c index fa9d7bf92..69a9c46f4 100644 --- a/polymer/eduke32/build/src/sdlayer.c +++ b/polymer/eduke32/build/src/sdlayer.c @@ -31,7 +31,7 @@ # include "gtkbits.h" #endif -#if (!defined __APPLE__ && !defined HAVE_GTK2) || (defined __APPLE__ && defined __BIG_ENDIAN__) +#if (!defined __APPLE__ && !defined HAVE_GTK2) || (defined __APPLE__) // && defined __BIG_ENDIAN__) int32_t startwin_open(void) { return 0; } int32_t startwin_close(void) { return 0; } int32_t startwin_puts(const char *s) { s=s; return 0; } diff --git a/polymer/eduke32/osxbuild.sh b/polymer/eduke32/osxbuild.sh index 569eb0c12..33617965e 100755 --- a/polymer/eduke32/osxbuild.sh +++ b/polymer/eduke32/osxbuild.sh @@ -30,7 +30,7 @@ if [ $onlyzip -eq 0 ]; then # fi make veryclean - WITHOUT_GTK=1 RELEASE=1 BUILD32_ON_64=0 make -j 3 + WITHOUT_GTK=1 RELEASE=1 BUILD32_ON_64=0 USE_LIBVPX=1 make -j 3 if [ $? ]; then echo 64-bit release build succeeded. cp mapster32 mapster32.x64 @@ -50,7 +50,7 @@ if [ $onlyzip -eq 0 ]; then # fi make veryclean - WITHOUT_GTK=1 RELEASE=1 BUILD32_ON_64=1 make -j 3 + WITHOUT_GTK=1 RELEASE=1 BUILD32_ON_64=1 USE_LIBVPX=0 make -j 3 if [ $? ]; then echo 32-bit release build succeeded. cp mapster32 mapster32.x86 @@ -70,7 +70,7 @@ if [ $onlyzip -eq 0 ]; then # fi make veryclean - ARCH='-arch ppc' WITHOUT_GTK=1 RELEASE=1 BUILD32_ON_64=0 make -j 3 + ARCH='-arch ppc' WITHOUT_GTK=1 RELEASE=1 BUILD32_ON_64=0 USE_LIBVPX=0 make -j 3 if [ $? ]; then echo PowerPC release build succeeded. cp mapster32 mapster32.ppc