fix ld error

This commit is contained in:
RpiBot 2017-06-11 15:33:48 +01:00
parent 9943dbdcc8
commit 3695dc1eb1
2 changed files with 4 additions and 3 deletions

View File

@ -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 $@

2
antd
View File

@ -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