From f0bde67653f85d885b3fb5b6318e8ff275a251a2 Mon Sep 17 00:00:00 2001 From: Jerome St-Louis Date: Sun, 13 Jul 2014 03:36:23 -0400 Subject: [PATCH 1/1] OS X build fixes; configure: improved --- configure | 40 ++++++++++++++++---------- deps/jpeg-9a/Makefile | 2 +- ecere/Makefile | 4 +-- ecere/src/gui/drivers/cocoa/CocoaEcereBridge.m | 2 +- ecere/src/gui/drivers/cocoa/CocoaInterface.ec | 2 +- 5 files changed, 30 insertions(+), 20 deletions(-) diff --git a/configure b/configure index 72f11b7..31f8f15 100755 --- a/configure +++ b/configure @@ -1,24 +1,34 @@ echo "The Ecere cross-platform SDK is pre-configured. Just type: - mingw32-make; if you're on Microsoft® Windows™ - You need MinGW or MinGW-w64. We recommend TDM-GCC. - For best results, use the version bundled with the latest Ecere installer for Windows. - ( http://ecere.org/install/windows ) + Linux: make - If you're on Apple® Mac™ OS X™, first add your toolchain bin directory - to the path and set SYSROOT to the SDK directory. e.g. with Xcode 4.5.2: + FreeBSD: gmake - export PATH=$PATH:/Applications/Xcode.app/Contents/Developer/usr/bin - export SYSROOT=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk - make; - (Lion™/Xcode™ 4.5.2 recommended) - Also tested on Mavericks with XCode 5, but debugger integration will not work without GDB. + Windows: mingw32-make - It's also recommended to install XQuartz. + You need MinGW or MinGW-w64. We recommend TDM-GCC. + For best results, use the version bundled with the latest Ecere installer for Windows. + ( http://ecere.org/install/windows ) + OS X: -or simply make; if you are on GNU/Linux™ + First add your toolchain bin directory to the path and set SYSROOT to the SDK directory. e.g. with Xcode 5.1.1: + export PATH=$PATH:/Applications/Xcode.app/Contents/Developer/usr/bin + export SYSROOT=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk -The SDK can probably be built on BSD and other Unixes with some additional -jiggery-pokery." + make + + Last tested on OS X™ Mavericks with XCode 5.1.1. + Please note that debugger integration only supports GDB and will not work with LLDB. It's also recommended to install XQuartz. + + Other UNIX systems: + + Given various degrees of efforts, it should be possible to build on other UNIX platforms. You will need a recent version of GNU Make (gmake). + GCC or Clang is required for your C compiler. (TCC might work too) + X86, AMD64, PowerPC, 32 bit ARM architectures are all known to work. + Some assumptions about the C types are currently made. (e.g. char: signed 1 byte, int: 4 bytes, float: 4 bytes, double: 8 bytes) + If your platform offers no way to conform to these assumptions, there would be a lot of code to reconsider. + + Please get in touch with us for help or to coordinate efforts improving platform support. +" diff --git a/deps/jpeg-9a/Makefile b/deps/jpeg-9a/Makefile index 9a9811a..052f52b 100644 --- a/deps/jpeg-9a/Makefile +++ b/deps/jpeg-9a/Makefile @@ -176,7 +176,7 @@ ifndef NOSTRIP $(STRIP) $(STRIPOPT) $(TARGET) endif else - $(AR) rcs $(TARGET) @$(OBJ)objects.lst $(LIBS) + $(AR) rcs $(TARGET) $(OBJECTS) $(LIBS) endif ifdef SHARED_LIBRARY_TARGET ifdef LINUX_TARGET diff --git a/ecere/Makefile b/ecere/Makefile index 6c7ac15..f6bb396 100644 --- a/ecere/Makefile +++ b/ecere/Makefile @@ -415,7 +415,7 @@ PRJ_CFLAGS += \ -I/usr/X11R6/include/freetype2 \ -I/usr/X11R6/include \ -I../deps/jpeg-9a \ - -I../deps/libpng-1.4.0 \ + -I../deps/libpng-1.6.12 \ -I../deps/libungif-4.1.1/lib,) \ $(if $(DEBUG), -g, -O2 -ffast-math) $(FPIC) -w \ -DBUILDING_ECERE_COM \ @@ -492,7 +492,7 @@ OFLAGS += \ -L$(SYSROOT)/usr/X11/lib \ -L/usr/X11R6/lib \ -L../deps/jpeg-9a/obj/release.$(PLATFORM)$(COMPILER_SUFFIX) \ - -L../deps/libpng-1.4.0/obj/release.$(PLATFORM)$(COMPILER_SUFFIX) \ + -L../deps/libpng-1.6.12/obj/release.$(PLATFORM)$(COMPILER_SUFFIX) \ -L../deps/libungif-4.1.1/obj/release.$(PLATFORM)$(COMPILER_SUFFIX) LIBS += \ $(call _L,curses) \ diff --git a/ecere/src/gui/drivers/cocoa/CocoaEcereBridge.m b/ecere/src/gui/drivers/cocoa/CocoaEcereBridge.m index 413a613..b080527 100644 --- a/ecere/src/gui/drivers/cocoa/CocoaEcereBridge.m +++ b/ecere/src/gui/drivers/cocoa/CocoaEcereBridge.m @@ -93,7 +93,7 @@ void CocoaDestroyRootWindow(WindowHandle handle) [view release]; } -void CocoaSetRootWindowCaption(WindowHandle handle, char *name) +void CocoaSetRootWindowCaption(WindowHandle handle, const char *name) { EcereView *view = (EcereView*)handle; diff --git a/ecere/src/gui/drivers/cocoa/CocoaInterface.ec b/ecere/src/gui/drivers/cocoa/CocoaInterface.ec index 5625942..612268b 100644 --- a/ecere/src/gui/drivers/cocoa/CocoaInterface.ec +++ b/ecere/src/gui/drivers/cocoa/CocoaInterface.ec @@ -62,7 +62,7 @@ class CocoaInterface : Interface const char **GraphicsDrivers(int *numDrivers) { static const char *graphicsDrivers[] = { "CocoaOpenGL" }; - *numDrivers = (const char *)sizeof(graphicsDrivers) / sizeof(char *); + *numDrivers = sizeof(graphicsDrivers) / sizeof(char *); return (char **)graphicsDrivers; } -- 1.8.3.1