Fix compile on OSX. 3.5
authorMichael McMaster <michael@codesrc.com>
Mon, 14 Jul 2014 10:28:33 +0000 (20:28 +1000)
committerMichael McMaster <michael@codesrc.com>
Mon, 14 Jul 2014 10:28:33 +0000 (20:28 +1000)
Moved to clang++ for better c++11 support. No more fat binaries,
min OSX 10.7

software/bootloaderhost/Makefile
software/bootloaderhost/main.cc
software/scsi2sd-config/Makefile
software/scsi2sd-debug/Makefile

index d12da46..6868b2b 100644 (file)
@@ -30,11 +30,10 @@ ifeq ($(TARGET),Darwin)
        # Should match OSX
        VPATH += hidapi/mac
        LDFLAGS += -framework IOKit -framework CoreFoundation
        # Should match OSX
        VPATH += hidapi/mac
        LDFLAGS += -framework IOKit -framework CoreFoundation
-       CPPFLAGS += -isysroot /Xcode3.1.4/SDKs/MacOSX10.5.sdk
-       CFLAGS += -mmacosx-version-min=10.5 -arch x86_64 -arch i386 -arch ppc
-       CXXFLAGS += -mmacosx-version-min=10.5 -arch x86_64 -arch i386 -arch ppc
-       CC=/Xcode3.1.4/usr/bin/gcc
-       CXX=/Xcode3.1.4/usr/bin/g++
+       CFLAGS += -mmacosx-version-min=10.7
+       CXXFLAGS += -stdlib=libc++ -mmacosx-version-min=10.7
+       CC=clang
+       CXX=clang++
        BUILD=build/mac
 endif
 
        BUILD=build/mac
 endif
 
index b48cdb2..8c8772e 100644 (file)
@@ -175,7 +175,7 @@ int main(int argc, char* argv[])
        std::stringstream firmMsg;
        firmMsg <<
                "  Firmware Silicon ID:\t" <<  std::hex << firmware.siliconId() <<
        std::stringstream firmMsg;
        firmMsg <<
                "  Firmware Silicon ID:\t" <<  std::hex << firmware.siliconId() <<
-                       "\n" <<
+                       "\n";
        std::cout << firmMsg.str() << std::endl;
 
        std::cout << "Starting firmware upload: " << filename << std::endl;
        std::cout << firmMsg.str() << std::endl;
 
        std::cout << "Starting firmware upload: " << filename << std::endl;
index 0b75eec..b75e7cc 100644 (file)
@@ -30,11 +30,10 @@ ifeq ($(TARGET),Darwin)
        # Should match OSX
        VPATH += ../bootloaderhost/hidapi/mac
        LDFLAGS += -framework IOKit -framework CoreFoundation
        # Should match OSX
        VPATH += ../bootloaderhost/hidapi/mac
        LDFLAGS += -framework IOKit -framework CoreFoundation
-       CPPFLAGS += -isysroot /Xcode3.1.4/SDKs/MacOSX10.5.sdk
-       CFLAGS += -mmacosx-version-min=10.5 -arch x86_64 -arch i386 -arch ppc
-       CXXFLAGS += -mmacosx-version-min=10.5 -arch x86_64 -arch i386 -arch ppc
-       CC=/Xcode3.1.4/usr/bin/gcc
-       CXX=/Xcode3.1.4/usr/bin/g++
+       CFLAGS += -mmacosx-version-min=10.7
+       CXXFLAGS += -stdlib=libc++ -mmacosx-version-min=10.7
+       CC=clang
+       CXX=clang++
        BUILD=build/mac
 endif
 
        BUILD=build/mac
 endif
 
index c89406e..34f7c3b 100644 (file)
@@ -30,11 +30,10 @@ ifeq ($(TARGET),Darwin)
        # Should match OSX
        VPATH += ../bootloaderhost/hidapi/mac
        LDFLAGS += -framework IOKit -framework CoreFoundation
        # Should match OSX
        VPATH += ../bootloaderhost/hidapi/mac
        LDFLAGS += -framework IOKit -framework CoreFoundation
-       CPPFLAGS += -isysroot /Xcode3.1.4/SDKs/MacOSX10.5.sdk
-       CFLAGS += -mmacosx-version-min=10.5 -arch x86_64 -arch i386 -arch ppc
-       CXXFLAGS += -mmacosx-version-min=10.5 -arch x86_64 -arch i386 -arch ppc
-       CC=/Xcode3.1.4/usr/bin/gcc
-       CXX=/Xcode3.1.4/usr/bin/g++
+       CFLAGS += -mmacosx-version-min=10.7
+       CXXFLAGS += -stdlib=libc++ -mmacosx-version-min=10.7
+       CC=clang
+       CXX=clang++
        BUILD=build/mac
 endif
 
        BUILD=build/mac
 endif