Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: 0b4f36123c
Fetching contributors…

Cannot retrieve contributors at this time

file 45 lines (37 sloc) 1.075 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45
OS = $(shell uname)
CWD = $(shell pwd -P)
NODE_WAF ?= node-waf
NODE_SRC_DIR ?= $(HOME)/src/ry-node
CFLAGS ?= -g -Wall
CXXFLAGS ?= -g -Wall

# We need to build position-independent code regardless of platform
ifneq ($(OS),Darwin)
CFLAGS += -fPIC
CXXFLAGS += -fPIC
endif

# These variables are respected by waf if we export them
export CFLAGS CXXFLAGS

.PHONY: all msgpack tags

all: msgpack

msgpack: deps/msgpack/dist/lib/libmsgpack.a
cd src && \
$(NODE_WAF) configure && \
$(NODE_WAF) build

# Build the msgpack library
deps/msgpack/dist/lib/libmsgpack.a:
cd deps/msgpack && \
mkdir -p dist && \
./configure --enable-static --disable-shared \
--prefix=$(PWD)/deps/msgpack/dist && \
make && \
make install

tags:
rm -f tags
find . -name '*.cc' -or -name '*.c' -or -name '*.cpp' -or -name '*.h' -or \
-name '*.hpp' -or -name '*.cpp' | ctags -L - -a
test -d $(NODE_SRC_DIR) && \
find $(NODE_SRC_DIR) -name '*.cc' -or -name '*.c' -or -name '*.h' | \
ctags -L - -a

clean:
cd deps/msgpack && (make distclean || true)
rm -fr deps/msgpack/dist build
Something went wrong with that request. Please try again.