Merge Powerbook pcb updates
[SCSI2SD.git] / software / bootloaderhost / Makefile
CommitLineData
7193c6f2 1all: build/bootloaderhost
c693c7fa 2
2db48d92
MM
3CYAPI = \
4 cybootloaderutils/cybtldr_api2.c \
5 cybootloaderutils/cybtldr_api.c \
6 cybootloaderutils/cybtldr_command.c \
7 cybootloaderutils/cybtldr_parse.c \
8
32a39b08 9CFLAGS += -Wall -Wno-pointer-sign
2db48d92
MM
10
11UNAME_S := $(shell uname -s)
12ifeq ($(UNAME_S),Linux)
13 HID_C = hidapi/linux/hid.c
14 LDFLAGS += -ludev
15endif
16ifeq ($(UNAME_S),Darwin)
17 # Should match OSX
18 HID_C = hidapi/mac/hid.c
32a39b08 19 LDFLAGS += -framework IOKit -framework CoreFoundation
2bad7c0d
MM
20 CFLAGS += -mmacosx-version-min=10.5 -arch x86_64 -arch i386 -arch ppc -isysroot /Xcode3.1.4/SDKs/MacOSX10.5.sdk
21 CC=/Xcode3.1.4/usr/bin/gcc
2db48d92
MM
22endif
23
24
7193c6f2
MM
25build/bootloaderhost: main.c $(HID_C) $(CYAPI)
26 mkdir -p $(dir $@)
32a39b08 27 $(CC) $(CFLAGS) -I cybootloaderutils -I hidapi/hidapi $^ $(LDFLAGS) -o $@
2db48d92
MM
28
29clean:
7193c6f2 30 rm build/bootloaderhost