--- makefile.orig 2005-07-27 17:22:01.000000000 -0700
+++ makefile 2017-09-16 17:11:24.000000000 -0700
# CC should be set to the name of your favorite C compiler.
# CSWITCHES is a list of all switches passed to the C compiler. I strongly
# recommend using the best level of optimization. I also strongly
# CSWITCHES = -O -DNO_TIMER -DLINUX -I/usr/X11R6/include -L/usr/X11R6/lib
-CSWITCHES = -O -DLINUX -I/usr/X11R6/include -L/usr/X11R6/lib
+CSWITCHES = __MACPORTS_CPPFLAGS__ __MACPORTS_CFLAGS__ __MACPORTS_LDFLAGS__
# TRILIBDEFS is a list of definitions used to compile an object code version
# of Triangle (triangle.o) to be called by another program. The file
all: $(BIN)triangle $(BIN)showme
trilibrary: $(BIN)triangle.o $(BIN)tricall
+ $(CC) -dynamiclib -install_name __MACPORTS_PREFIX__/lib/libtriangle.dylib $(CSWITCHES) -o libtriangle.dylib $(BIN)triangle.o
+ /usr/bin/ar rcs libtriangle.a $(BIN)triangle.o
$(BIN)triangle: $(SRC)triangle.c
$(CC) $(CSWITCHES) -o $(BIN)triangle $(SRC)triangle.c -lm