Commit 00ee1e92f04a7477cd2c5b1ba9374b4feb5f4f4c
authorMichel Pollet <buserror@gmail.com>
Fri, 2 Mar 2012 14:27:52 +0000 (14:27 +0000)
committerMichel Pollet <buserror@gmail.com>
Fri, 2 Mar 2012 15:00:26 +0000 (15:00 +0000)
Only add the MacPort dir if it's there. This
removes a warning when linking

Signed-off-by: Michel Pollet <buserror@gmail.com>
Makefile.common

index d476d8366fb613faaa941207d748b32160bc1510..32edcccd217a1b622a781a972dc8c9271085e42d 100644 (file)
@@ -40,7 +40,11 @@ ifeq (${shell uname}, Darwin)
 AVR_ROOT       := "/Applications/Arduino.app/Contents/Resources/Java/hardware/tools/avr/"
 AVR_INC        := ${AVR_ROOT}/avr-4/
 AVR            := ${AVR_ROOT}/bin/avr-
-LFLAGS                 += -L/opt/local/lib
+# Thats for MacPorts libelf
+ifeq (${shell test -d /opt/local && echo Exists}, Exists)
+IPATH          += /opt/local/include
+LFLAGS         = -L/opt/local/lib/
+endif
 else
 AVR_ROOT       := /usr/lib/avr
 AVR_INC        := ${AVR_ROOT}