summaryrefslogtreecommitdiffstats
path: root/commandline
diff options
context:
space:
mode:
authorAaron Stone <aaron@serendipity.cx>2013-12-17 13:08:12 -0800
committerAaron Stone <aaron@serendipity.cx>2013-12-17 13:26:28 -0800
commitde666eec6a939eb7034d6f6c9bf7a22ede463303 (patch)
tree888bede2dfd852f790f8cfbf904c8b9d7dda89b9 /commandline
parentd9e1adda960b22b9571a04b79d1a261983e6e11a (diff)
downloadmicronucleus-de666eec6a939eb7034d6f6c9bf7a22ede463303.tar.gz
micronucleus-de666eec6a939eb7034d6f6c9bf7a22ede463303.tar.bz2
micronucleus-de666eec6a939eb7034d6f6c9bf7a22ede463303.zip
commandline: Makefile use shell assignments to execute once
Backticks in the variables would execute at each invocation. With Macports, libusb 0.x config is called libusb-legacy-config.
Diffstat (limited to 'commandline')
-rw-r--r--commandline/Makefile12
1 files changed, 6 insertions, 6 deletions
diff --git a/commandline/Makefile b/commandline/Makefile
index af9a9ee..b5bea87 100644
--- a/commandline/Makefile
+++ b/commandline/Makefile
@@ -1,17 +1,17 @@
# Makefile initially writen for Little-Wire by Omer Kilic <omerkilic@gmail.com>
-# Later on modified by ihsan Kehribar <ihsan@kehribar.me> for Micronucleus bootloader application.
+# Later on modified by ihsan Kehribar <ihsan@kehribar.me> for Micronucleus bootloader application.
CC=gcc
# FIXME: Need to add OSX stuff
ifeq ($(shell uname), Linux)
- USBFLAGS = `libusb-config --cflags`
- USBLIBS = `libusb-config --libs`
+ USBFLAGS=$(shell libusb-config --cflags)
+ USBLIBS=$(shell libusb-config --libs)
EXE_SUFFIX =
OSFLAG = -D LINUX
else ifeq ($(shell uname), Darwin)
- USBFLAGS = `libusb-config --cflags`
- USBLIBS = `libusb-config --libs`
+ USBFLAGS=$(shell libusb-config --cflags || libusb-legacy-config --cflags)
+ USBLIBS=$(shell libusb-config --libs || libusb-legacy-config --libs)
EXE_SUFFIX =
OSFLAG = -D MAC_OS
else
@@ -36,7 +36,7 @@ library: $(LWLIBS)
$(LWLIBS):
@echo Building library: $@...
- $(CC) $(CFLAGS) -c library/$@.c
+ $(CC) $(CFLAGS) -c library/$@.c
$(EXAMPLES): $(addsuffix .o, $(LWLIBS))
@echo Building example: $@...