6 ifeq ($(OS), LINUX) # also works on FreeBSD
9 hid_bootloader_cli: hid_bootloader_cli.c
10 $(CC) $(CFLAGS) -s -DUSE_LIBUSB -o hid_bootloader_cli hid_bootloader_cli.c -lusb
13 else ifeq ($(OS), WINDOWS)
14 CC = i586-mingw32msvc-gcc
16 hid_bootloader_cli.exe: hid_bootloader_cli.c
17 $(CC) $(CFLAGS) -s -DUSE_WIN32 -o hid_bootloader_cli.exe hid_bootloader_cli.c -lhid -lsetupapi
20 else ifeq ($(OS), MACOSX)
22 SDK ?= /Developer/SDKs/MacOSX10.5.sdk
24 hid_bootloader_cli: hid_bootloader_cli.c
25 $(CC) $(CFLAGS) -DUSE_APPLE_IOKIT -isysroot $(SDK) -o hid_bootloader_cli hid_bootloader_cli.c -Wl,-syslibroot,$(SDK) -framework IOKit -framework CoreFoundation
28 else ifeq ($(OS), BSD) # works on NetBSD and OpenBSD
31 hid_bootloader_cli: hid_bootloader_cli.c
32 $(CC) $(CFLAGS) -s -DUSE_UHID -o hid_bootloader_cli hid_bootloader_cli.c
39 rm -f hid_bootloader_cli hid_bootloader_cli.exe