Makefile: OSX Update
[simavr] / Makefile.common
index d476d83..32edccc 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}