build: support building a .so
This commit adds support to the regular Makefile as opposed to the gyp build.
This commit is contained in:
parent
d56434a21d
commit
cc36fd0366
@ -46,6 +46,10 @@ OBJS += src/unix/threadpool.o
|
|||||||
OBJS += src/unix/timer.o
|
OBJS += src/unix/timer.o
|
||||||
OBJS += src/unix/tty.o
|
OBJS += src/unix/tty.o
|
||||||
OBJS += src/unix/udp.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))
|
ifeq (SunOS,$(uname_S))
|
||||||
EV_CONFIG=config_sunos.h
|
EV_CONFIG=config_sunos.h
|
||||||
@ -128,9 +132,13 @@ endif
|
|||||||
RUNNER_LIBS=
|
RUNNER_LIBS=
|
||||||
RUNNER_SRC=test/runner-unix.c
|
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 $@ $^
|
$(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
|
src/%.o: src/%.c include/uv.h include/uv-private/uv-unix.h
|
||||||
$(CC) $(CSTDFLAG) $(CPPFLAGS) $(CFLAGS) -c $< -o $@
|
$(CC) $(CSTDFLAG) $(CPPFLAGS) $(CFLAGS) -c $< -o $@
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user