summarylogtreecommitdiffstats
path: root/libarsal-Makefile
diff options
context:
space:
mode:
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 $< >$@