Commits

Anonymous committed 670caca

OSX build fixes

  • Participants
  • Parent commits ff024bc

Comments (0)

Files changed (2)

File projects/unix/Makefile

   OS = OSX
   SO_EXTENSION = dylib
   SHARED = -bundle
+  BOOST_SUFFIX = -mt
 endif
 ifeq ("$(UNAME)","FreeBSD")
   OS = FREEBSD
     OSX_SYSROOT := /Developer/SDKs
   endif
 
+  CXXFLAGS += -std=c++11 -stdlib=libc++
   ifeq ($(CPU), X86)
+    LDFLAGS += -bundle -L/opt/local/lib
+    LDLIBS += -ldl
     ifeq ($(ARCH_DETECTED), 64BITS)
       CFLAGS += -pipe -arch x86_64 -mmacosx-version-min=$(OSX_SDK) -isysroot $(OSX_SYSROOT)/MacOSX$(OSX_SDK).sdk
-      LDFLAGS += -bundle
-      LDLIBS += -ldl
     else
       CFLAGS += -pipe -mmmx -msse -fomit-frame-pointer -arch i686 -mmacosx-version-min=$(OSX_SDK) -isysroot $(OSX_SYSROOT)/MacOSX$(OSX_SDK).sdk
-      LDFLAGS += -bundle
-      LDLIBS += -ldl
     endif
   endif
 endif
   CFLAGS += -g
   INSTALL_STRIP_FLAG ?= 
 else
-  INSTALL_STRIP_FLAG ?= -s
+  ifneq ($(OS),OSX)
+    INSTALL_STRIP_FLAG ?= -s
+  endif
 endif
 ifeq ($(NO_ASM), 1)
   CFLAGS += -DNO_ASM
 else
 SOURCE += $(SRCDIR)/Glide64/osal_dynamiclib_unix.c
 endif
-
+ 
 
 
 # generate a list of object files build, make a temporary directory for them

File src/GlideHQ/TxUtil.cpp

 #include "TxUtil.h"
 #include "TxDbg.h"
 #include <zlib.h>
-#include <malloc.h>
+#include <stdlib.h>
 #ifdef _WIN32
 #define WIN32_LEAN_AND_MEAN
 #include <windows.h>