1 VPATH=cybootloaderutils ../SCSI2SD/src
3 CPPFLAGS = -I cybootloaderutils -I hidapi/hidapi -I wxWidgets/include -I ../include
4 CFLAGS += -Wall -Wno-pointer-sign -O2 -g
5 CXXFLAGS += -Wall -O2 -g -std=c++0x
7 TARGET ?= $(shell uname -s)
9 VPATH += hidapi/windows
10 LDFLAGS += -static -mconsole -mwindows -lsetupapi
11 BUILD = build/windows/32bit
12 CC=i686-w64-mingw32-gcc
13 CXX=i686-w64-mingw32-g++
15 WX_CONFIG=--host=i686-w64-mingw32 --enable-monolithic --enable-stl --disable-shared
17 ifeq ($(TARGET),Win64)
18 VPATH += hidapi/windows
19 LDFLAGS += -static -mconsole -mwindows -lsetupapi
20 BUILD = build/windows/64bit
21 CC=x86_64-w64-mingw32-gcc
22 CXX=x86_64-w64-mingw32-g++
24 WX_CONFIG=--host=x86_64-w64-mingw32 --enable-monolithic --enable-stl --disable-shared
26 ifeq ($(TARGET),Linux)
30 WX_CONFIG=--enable-monolithic --enable-stl
32 ifeq ($(TARGET),Darwin)
35 LDFLAGS += -framework IOKit -framework CoreFoundation
36 CFLAGS += -mmacosx-version-min=10.7
37 CXXFLAGS += -stdlib=libc++ -mmacosx-version-min=10.7
41 WX_CONFIG=--enable-monolithic --enable-stl --disable-shared
44 all: $(BUILD)/scsi2sd-util$(EXE)
47 $(BUILD)/cybtldr_api2.o \
48 $(BUILD)/cybtldr_api.o \
49 $(BUILD)/cybtldr_command.o \
50 $(BUILD)/cybtldr_parse.o \
59 $(BUILD)/scsi2sd-util.o \
60 $(BUILD)/ConfigUtil.o \
62 $(BUILD)/TargetPanel.o \
63 $(BUILD)/SCSI2SD_Bootloader.o \
64 $(BUILD)/SCSI2SD_HID.o \
65 $(BUILD)/hidpacket.o \
68 $(OBJ): $(BUILD)/wx.buildstamp
69 $(BUILD)/wx.buildstamp:
73 $(CURDIR)/wxWidgets/configure $(WX_CONFIG) && \
80 $(CC) $(CPPFLAGS) $(CFLAGS) $< -c -o $@
84 $(CXX) $(CPPFLAGS) $(CXXFLAGS) `$(BUILD)/wx-config --cxxflags` $< -c -o $@
86 $(BUILD)/scsi2sd-util$(EXE): $(OBJ)
88 $(CXX) $(CXXFLAGS) $^ $(LDFLAGS) `$(BUILD)/wx-config --libs` -o $@
91 rm $(BUILD)/scsi2sd-util$(EXE) $(OBJ)