diff options
author | Adam D. Horden <adam.horden+github@horden.me> | 2016-09-04 11:00:00 +0100 |
---|---|---|
committer | Adam D. Horden <adam.horden+github@horden.me> | 2016-09-04 11:00:00 +0100 |
commit | a4b050c8ef223992d6be6835dd7ffb4f3801e198 (patch) | |
tree | 1d0639bcbc29acebf08eca34cba54454899d2101 | |
parent | 5899972bb2dac0e071740150d257de206409f501 (diff) | |
download | icestorm-a4b050c8ef223992d6be6835dd7ffb4f3801e198.tar.gz icestorm-a4b050c8ef223992d6be6835dd7ffb4f3801e198.tar.bz2 icestorm-a4b050c8ef223992d6be6835dd7ffb4f3801e198.zip |
Fix to enable a clean build on Mac OS X.
The fix will check to see if you are compiling on Mac OS X and set the
correct LDLIBS and CFLAGS for Mac OS X.
-rw-r--r-- | iceprog/Makefile | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/iceprog/Makefile b/iceprog/Makefile index 5b9f790..fdeadf5 100644 --- a/iceprog/Makefile +++ b/iceprog/Makefile @@ -1,6 +1,13 @@ include ../config.mk -LDLIBS = -L/usr/local/lib -lm -CFLAGS = -MD -O0 -ggdb -Wall -std=c99 -I/usr/local/include + +UNAME := $(shell uname -s) +ifneq ($(UNAME),Darwin) + LDLIBS = -L/usr/local/lib -lm + CFLAGS = -MD -O0 -ggdb -Wall -std=c99 -I/usr/local/include +else + LDLIBS = -L/usr/local/lib -L/opt/local/lib -lftdi -lm + CFLAGS = -MD -O0 -ggdb -Wall -std=c99 -I/usr/local/include -I/opt/local/include/ +endif ifeq ($(STATIC),1) LDFLAGS += -static |