From 3695dc1eb17442641e2f15075019f449c22b8a93 Mon Sep 17 00:00:00 2001 From: RpiBot Date: Sun, 11 Jun 2017 15:33:48 +0100 Subject: [PATCH] fix ld error --- Makefile | 5 +++-- antd | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 8c2f309..873c50d 100644 --- a/Makefile +++ b/Makefile @@ -29,7 +29,7 @@ CFLAGS= -W -Wall -g -std=c99 -D DEBUG $(DB_FLAG) $(PF_FLAG) LIB_PATH=$(BUILDIRD)/plugins LIB_NAME=libantd -LIB_FLAG= $(LIB_PATH$)/$(LIB_NAME).$(EXT) +LIB_FLAG= $(LIB_NAME).$(EXT) SERVERLIB=-lpthread -ldl $(LIB_FLAG) SERVER_O=plugin_manager.o \ @@ -59,7 +59,8 @@ httpd: lib $(SERVER_O) cp antd $(BUILDIRD) lib: $(LIBOBJS) - $(CC) $(CFLAGS) $(DB_LIB) -shared -o $(LIB_PATH$)/$(LIB_NAME).$(EXT) $(LIBOBJS) + $(CC) $(CFLAGS) $(DB_LIB) -shared -o $(LIB_NAME).$(EXT) $(LIBOBJS) + cp $(LIB_NAME).$(EXT) $(LIB_PATH$)/ %.o: %.c $(CC) -fPIC $(CFLAGS) -c $< -o $@ diff --git a/antd b/antd index eb341e1..88f3467 100755 --- a/antd +++ b/antd @@ -1,7 +1,7 @@ #!/bin/sh UNAME=`uname -s` -if [ "$UNAME" == "Darwin" ]; then +if [ "$UNAME" = "Darwin" ]; then DYLD_LIBRARY_PATH=$(dirname "$0")/plugins/ $(dirname "$0")/httpd $(dirname "$0")/config.ini else LD_LIBRARY_PATH=$(dirname "$0")/plugins/ $(dirname "$0")/httpd $(dirname "$0")/config.ini