Permalink
Browse files

allow "make install" to work easily with a brew-installed python

(From Mark Cavage)
  • Loading branch information...
1 parent 8970cd4 commit 3dc7e07beca7b09ac1788ad34f647e87dac59182 @davepacheco committed Dec 5, 2011
Showing with 12 additions and 4 deletions.
  1. +12 −4 Makefile
View
16 Makefile
@@ -10,15 +10,23 @@ CSRCS = \
OBJECTS = $(CSRCS:%.c=$(BUILDDIR)/%.o)
CFLAGS += -fno-strict-aliasing -O -fPIC
+
+SOLDFLAGS += -shared
CPPFLAGS += -DNDEBUG -D_REENTRANT \
- -I/usr/include -I/opt/local/include/db4 \
- -I/opt/local/include/ncurses \
-Ispidermonkey/src -Ispidermonkey/src/build \
- -I/opt/local/include/python2.4
-SOLDFLAGS += -shared
+ -I/usr/include \
ifeq ($(BUILDOS),Darwin)
+ CPPFLAGS += -I/System/Library/Frameworks/Python.framework/Versions/2.6/include/python2.6
+ SOLDFLAGS += -lpython2.6
LD=gcc
+ CC=gcc
+else
+ CPPFLAGS += \
+ -I/opt/local/include/db4 \
+ -I/usr/local/include/python2.7 \
+ -I/opt/local/include/ncurses \
+ -I/opt/local/include/python2.4
endif
SOFILE = $(BUILDDIR)/pyspidermonkey.so

0 comments on commit 3dc7e07

Please sign in to comment.