summarylogtreecommitdiffstats
path: root/libarsal-Makefile
diff options
context:
space:
mode:
authorAlexandre Iooss2016-08-22 14:03:50 +0200
committerAlexandre Iooss2016-08-22 14:03:50 +0200
commitf033454a8e009ab97e48a9f37ac139b7129e07df (patch)
tree7f91f780a9e8448682bb65c033ffd68e6705472c /libarsal-Makefile
parente2fe8c3598885f0f66b4325d155e156f9e5b05ce (diff)
downloadaur-libarsal-git.tar.gz
Linked libs
Diffstat (limited to 'libarsal-Makefile')
-rw-r--r--libarsal-Makefile7
1 files changed, 4 insertions, 3 deletions
diff --git a/libarsal-Makefile b/libarsal-Makefile
index 90591c90d25d..50c2f2d28148 100644
--- a/libarsal-Makefile
+++ b/libarsal-Makefile
@@ -1,6 +1,7 @@
CC = gcc
-CFLAGS = -fPIC -Wall -Wextra -O2 -g -lpthread -DHAVE_CONFIG_H -IConfig/linux -IIncludes
-LDFLAGS = -shared
+CFLAGS = -fPIC -Wall -Wextra -O2 -g -DHAVE_CONFIG_H -IConfig/linux -IIncludes
+LIBS = -lpthread
+LDFLAGS = -shared -Wl,-O1,-as-needed,-no-undefined,-z,relro,-z,now
RM = rm -f
TARGET_LIB = libarsal.so
@@ -21,7 +22,7 @@ OBJS = $(SRCS:.c=.o)
all: ${TARGET_LIB}
$(TARGET_LIB): $(OBJS)
- $(CC) ${LDFLAGS} -o $@ $^
+ $(CC) ${LDFLAGS} -o $@ $^ ${LIBS}
$(SRCS:.c=.d):%.d:%.c
$(CC) $(CFLAGS) -MM $< >$@