summarylogtreecommitdiffstats
path: root/libarstream2-Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'libarstream2-Makefile')
-rw-r--r--libarstream2-Makefile5
1 files changed, 3 insertions, 2 deletions
diff --git a/libarstream2-Makefile b/libarstream2-Makefile
index 7c6489d22323..2a2cc456e6a4 100644
--- a/libarstream2-Makefile
+++ b/libarstream2-Makefile
@@ -1,6 +1,7 @@
CC = gcc
CFLAGS = -fPIC -Wall -Wextra -O2 -g -IIncludes -DHAVE_CONFIG_H
-LDFLAGS = -shared
+LIBS = -larsal -lm
+LDFLAGS = -shared -Wl,-O1,-as-needed,-no-undefined,-z,relro,-z,now
RM = rm -f
TARGET_LIB = libarstream2.so
@@ -19,7 +20,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 $< >$@