Skip to content

Commit

Permalink
workaround compile issues on Darwin (OS X)
Browse files Browse the repository at this point in the history
Signed-off-by: Ben Noordhuis <info@bnoordhuis.nl>
  • Loading branch information
Adrian Achihăei authored and bnoordhuis committed Oct 2, 2010
1 parent 0ec5ff3 commit c0815a8
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
UNAME := $(shell uname)
NODE_PATH =/usr/local

LIBICONV_DIR =deps/libiconv-1.13.1
Expand All @@ -6,7 +7,11 @@ LIBICONV =$(LIBICONV_DIR)/lib/.libs/libiconv.a
CXXFLAGS =-I$(LIBICONV_DIR)/include -I$(NODE_PATH)/include/node -O2 -fPIC -Wall -ansi

all: $(LIBICONV) iconv.o
ifeq ($(UNAME),Darwin)
$(CXX) -flat_namespace -undefined suppress -shared -o iconv.node iconv.o $(LIBICONV)
else
$(CXX) -shared -o iconv.node iconv.o $(LIBICONV)
endif

install: all
mkdir -p $(HOME)/.node_libraries && cp iconv.node $(HOME)/.node_libraries
Expand Down

0 comments on commit c0815a8

Please sign in to comment.