From cc36fd036606a3dec452b6e40ded41db6e5bf322 Mon Sep 17 00:00:00 2001 From: Ben Noordhuis Date: Thu, 8 Nov 2012 18:06:14 +0100 Subject: [PATCH] build: support building a .so This commit adds support to the regular Makefile as opposed to the gyp build. --- config-unix.mk | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/config-unix.mk b/config-unix.mk index b619359a..dc7b766b 100644 --- a/config-unix.mk +++ b/config-unix.mk @@ -46,6 +46,10 @@ OBJS += src/unix/threadpool.o OBJS += src/unix/timer.o OBJS += src/unix/tty.o OBJS += src/unix/udp.o +OBJS += src/unix/ev/ev.o +OBJS += src/fs-poll.o +OBJS += src/uv-common.o +OBJS += src/inet.o ifeq (SunOS,$(uname_S)) EV_CONFIG=config_sunos.h @@ -128,9 +132,13 @@ endif RUNNER_LIBS= RUNNER_SRC=test/runner-unix.c -libuv.a: $(OBJS) src/fs-poll.o src/inet.o src/uv-common.o src/unix/ev/ev.o +libuv.a: $(OBJS) $(AR) rcs $@ $^ +libuv.so: CFLAGS += -fPIC +libuv.so: $(OBJS) + $(CC) -shared -o $@ $^ + src/%.o: src/%.c include/uv.h include/uv-private/uv-unix.h $(CC) $(CSTDFLAG) $(CPPFLAGS) $(CFLAGS) -c $< -o $@