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.
This commit is contained in:
Adam D. Horden 2016-09-04 11:00:00 +01:00
parent 5899972bb2
commit a4b050c8ef
1 changed files with 9 additions and 2 deletions

View File

@ -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