Skip to content

Commit

Permalink
Changes and fixes to allow compilation on MacOS X
Browse files Browse the repository at this point in the history
  • Loading branch information
alranel committed Aug 27, 2011
1 parent ce5278e commit 509b63b
Showing 1 changed file with 12 additions and 6 deletions.
18 changes: 12 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,28 +1,34 @@
BIN=../bin/
LIB=../lib/
BIN=./bin/
LIB=./lib/
ALL=${BIN}e3d

all: ${ALL}

clean:
rm -rf ${BIN} ${LIB}

ifeq ($(shell uname),Linux)
CCOPTS=-Wall -D_GNU_SOURCE -O -fPIC -g
OPTS= ${CCOPTS}
endif

ifeq ($(shell uname),Darwin)
CCOPTS= -fnested-functions
OPTS=-L/opt/local/lib -I/opt/local/include ${CCOPTS}
OPTS=-L/opt/local/lib -I/opt/local/include -I/usr/include/malloc ${CCOPTS}
endif

${LIB}%.o: %.c e3d.h
-indent $<
#-indent $<
mkdir -p ${LIB}
cc -c -o $@ $< ${OPTS}

${BIN}%: %.c
-indent $<
#-indent $<
mkdir -p ${BIN}
cc -o $@ $< ${OPTS} -lpopt

${BIN}e3d: e3d.c ${LIB}e3d-common.o ${LIB}e3d-stl.o ${LIB}e3d-slice.o ${LIB}e3d-fill.o ${LIB}e3d-gcode.o ${LIB}e3d-svg.o ${LIB}poly.o
-indent $<
#-indent $<
mkdir -p ${BIN}
cc -o $@ $< ${OPTS} -lpopt -lm ${LIB}e3d-common.o ${LIB}e3d-stl.o ${LIB}e3d-slice.o ${LIB}e3d-fill.o ${LIB}e3d-gcode.o ${LIB}e3d-svg.o ${LIB}poly.o

0 comments on commit 509b63b

Please sign in to comment.