Permalink
Browse files

fixed shared library not found issue

  • Loading branch information...
1 parent 89dc5f6 commit 0e266df8b0e06ceee062eb2c9c51bede3887cf99 @coolaj86 committed Jan 28, 2011
Showing with 6 additions and 4 deletions.
  1. +1 −1 libevnet/Makefile
  2. +5 −3 paired-threaded-ipc/Makefile
View
@@ -18,7 +18,7 @@ static:
ar rcs lib/libevnet.a obj/enet.o obj/inbuf.o obj/buffer-list.o
shared:
- $(SCC) -soname,libevnet.so.1 \
+ $(SCC) -Wl,-soname,libevnet.so.1 \
-o lib/libevnet.so.1.0.0 \
evn.c \
buffer-list.c \
@@ -1,5 +1,7 @@
CFLAGS=-Wall -Werror -Iinclude -g3 -ggdb3 -I/opt/local/include -I../include
-LDFLAGS=-lev -lpthread -lenet -g3 -ggdb3 -L/opt/local/lib -L./lib/ -largp
+LDFLAGS=-lev -levnet -lpthread -g3 -ggdb3 -L/opt/local/lib -L./lib
+# on OS X include -largp
+# LDFLAGS+= -largp
CC=gcc ${CFLAGS} ${LDFLAGS}
all: enet clean server remote test
@@ -11,10 +13,10 @@ enet:
cp -a ../libevnet/lib/libevnet.so* ./lib/
server:
- $(CC) -o dummyd dummy-daemon.c dummy-worker.c dummy-worker-thread.c dummy-settings.c rand.c
+ $(CC) -o dummyd dummy-daemon.c dummy-worker.c dummy-worker-thread.c dummy-settings.c rand.c -levnet -L./lib
remote:
- $(CC) -o dummy-rc dummy-rc.c dummy-settings.c
+ $(CC) -o dummy-rc dummy-rc.c dummy-settings.c -levnet -L./lib
test:
$(CC) -o rand-test rand.c rand-test.c

0 comments on commit 0e266df

Please sign in to comment.