Removed C++11 dependencies, and compile Windows binaries staically with mingw.
[SCSI2SD.git] / software / scsi2sd-debug / Makefile
index c89406e..c68e105 100644 (file)
@@ -1,13 +1,13 @@
 
 CPPFLAGS = -I ../bootloaderhost/hidapi/hidapi -I ../bootloaderhost
 CFLAGS += -Wall -Wno-pointer-sign -O2
-CXXFLAGS += -Wall -std=c++11 -O2
+CXXFLAGS += -Wall -O2
 VPATH += ../bootloaderhost
 
 TARGET ?= $(shell uname -s)
 ifeq ($(TARGET),Win32)
        VPATH += hidapi/windows
-       LDFLAGS += -mconsole -mwindows -lsetupapi -lws2_32
+       LDFLAGS += -static -mconsole -mwindows -lsetupapi -lws2_32
        BUILD = build/windows/32bit
        CC=i686-w64-mingw32-gcc
        CXX=i686-w64-mingw32-g++
@@ -15,7 +15,7 @@ ifeq ($(TARGET),Win32)
 endif
 ifeq ($(TARGET),Win64)
        VPATH += hidapi/windows
-       LDFLAGS += -mconsole -mwindows -lsetupapi -lws2_32
+       LDFLAGS += -static -mconsole -mwindows -lsetupapi -lws2_32
        BUILD = build/windows/64bit
        CC=x86_64-w64-mingw32-gcc
        CXX=x86_64-w64-mingw32-g++
@@ -30,11 +30,10 @@ ifeq ($(TARGET),Darwin)
        # 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