From f33d4e657f676baca4ce19cc79573cb9a9810a05 Mon Sep 17 00:00:00 2001 From: Aaron Stone Date: Tue, 14 Jan 2014 04:35:30 -0800 Subject: commandline: Update Makefile for OS X --- commandline/Makefile | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'commandline') diff --git a/commandline/Makefile b/commandline/Makefile index 5d7a410..3c52cb4 100644 --- a/commandline/Makefile +++ b/commandline/Makefile @@ -3,7 +3,6 @@ CC=gcc -# FIXME: Need to add OSX stuff ifeq ($(shell uname), Linux) USBFLAGS=$(shell libusb-config --cflags) USBLIBS=$(shell libusb-config --libs) @@ -14,6 +13,13 @@ else ifeq ($(shell uname), Darwin) USBLIBS=$(shell libusb-config --libs || libusb-legacy-config --libs) EXE_SUFFIX = OSFLAG = -D MAC_OS + # Uncomment these to create a static binary: + # USBLIBS = /opt/local/lib/libusb-legacy/libusb-legacy.a + # USBLIBS += -mmacosx-version-min=10.5 + # USBLIBS += -framework CoreFoundation + # USBLIBS += -framework IOKit + # Uncomment these to create a dual architecture binary: + # OSFLAG += -arch x86_64 -arch i386 else USBFLAGS = -I C:\MinGW\include USBLIBS = -L C:\MinGW\lib -lusb @@ -41,7 +47,7 @@ $(LWLIBS): $(EXAMPLES): $(addsuffix .o, $(LWLIBS)) @echo Building command line tool: $@... $(CC) $(CFLAGS) -o $@$(EXE_SUFFIX) $@.c $^ $(LIBS) - + clean: rm -f $(EXAMPLES)$(EXE_SUFFIX) *.o *.exe -- cgit v1.2.3