summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAidan MacDonald <amachronic@protonmail.com>2021-06-05 22:36:24 +0100
committerAidan MacDonald <amachronic@protonmail.com>2021-06-06 11:52:23 +0100
commit695d1701cdd1bb4539f652c2204f7787097b2715 (patch)
tree0da04c34a3f85a01f202cad746ecfd0965fece75
parent474293a12b6152041404378abd932ac495e5e18d (diff)
downloadrockbox-695d1701cdd1bb4539f652c2204f7787097b2715.tar.gz
rockbox-695d1701cdd1bb4539f652c2204f7787097b2715.zip
jztool: add correct compiler flags for building on Mac
Change-Id: Ic89b5a2e65754891fedd63fec1e7235ed424e5f9
-rw-r--r--rbutil/jztool/Makefile22
1 files changed, 15 insertions, 7 deletions
diff --git a/rbutil/jztool/Makefile b/rbutil/jztool/Makefile
index bc2724ef59..5e397c59aa 100644
--- a/rbutil/jztool/Makefile
+++ b/rbutil/jztool/Makefile
@@ -25,15 +25,23 @@ ifeq ($(findstring WIN32,$(CPPDEFINES)),WIN32)
25# TODO: support Windows 25# TODO: support Windows
26else 26else
27ifeq ($(findstring APPLE,$(CPPDEFINES)),APPLE) 27ifeq ($(findstring APPLE,$(CPPDEFINES)),APPLE)
28# OSX -- /opt location is cheesy attempt to support ARM macs 28# Mac, tested on x86 only -- may need to adjust paths if building on ARM.
29# COMPLETELY UNTESTED, testing from someone with an actual Mac is appreciated! 29# paths should work with homebrew libusb.
30CFLAGS += -I/usr/local/include -I/opt/homebrew/include 30LIBUSB_CFLAGS ?= -I/usr/local/include/libusb-1.0
31LDOPTS += -L/usr/local/lib -L/opt/homebrew/lib -lusb-1.0 31ifdef STATIC
32LIBUSB_LDOPTS ?= /usr/local/lib/libusb-1.0.a -framework IOKit -framework CoreFoundation
32else 33else
33# Linux 34LIBUSB_LDOPTS ?= -L/usr/local/lib -lusb-1.0
34CFLAGS += `pkg-config --cflags libusb-1.0` 35endif
35LDOPTS += `pkg-config --libs libusb-1.0` 36else
37# Linux; note for static builds you need to build a copy of libusb without
38# udev support and specify the includes / libs manually
39LIBUSB_CFLAGS ?= `pkg-config --cflags libusb-1.0`
40LIBUSB_LDOPTS ?= `pkg-config --libs libusb-1.0`
36endif 41endif
37endif 42endif
38 43
44CFLAGS += $(LIBUSB_CFLAGS)
45LDOPTS += $(LIBUSB_LDOPTS)
46
39include ../libtools.make 47include ../libtools.make