Skip to content

Commit

Permalink
build: updated support for building with MacPorts
Browse files Browse the repository at this point in the history
Updated Macports support based on Homebrew support.  Set correct paths
for MacPorts-provided avr-gcc and libelf.
  • Loading branch information
stevedrake committed Jan 18, 2016
1 parent 0ba0c72 commit 51ee344
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions Makefile.common
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,17 @@ ifeq (${shell uname}, Darwin)
AVR := ${AVR_ROOT}/bin/avr-
# Thats for MacPorts libelf
ifeq (${shell test -d /opt/local && echo Exists}, Exists)
IPATH += /opt/local/include
LFLAGS = -L/opt/local/lib/
ifneq (${shell test -d /opt/local/avr && echo Exists}, Exists)
$(error Please install avr-gcc: port install avr-gcc avr-libc)
endif
ifneq (${shell test -d /opt/local/include/libelf && echo Exists}, Exists)
$(error Please install libelf: port install libelf)
endif
CC = clang
IPATH += /opt/local/include /opt/local/include/libelf
LFLAGS = -L/opt/local/lib/
AVR_INC := /opt/local/avr
AVR := /opt/local/bin/avr-
else
# That's for Homebrew libelf and avr-gcc support
ifeq (${shell test -d /usr/local/Cellar && echo Exists}, Exists)
Expand Down

0 comments on commit 51ee344

Please sign in to comment.