aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorAlessandro Iezzi <aiezzi@alessandroiezzi.it>2024-08-02 18:00:40 +0200
committerAlessandro Iezzi <aiezzi@alessandroiezzi.it>2024-08-02 18:00:40 +0200
commit61dbbfe932ca3cf68a20242296e21c11ac43d643 (patch)
tree1aa00c442c6d82e5ce551d9b8f5edc58fe0c5ccc /Makefile
parent8acab012bff56dd8b538d60c76dc084637887895 (diff)
downloadproperties-61dbbfe932ca3cf68a20242296e21c11ac43d643.tar.gz
properties-61dbbfe932ca3cf68a20242296e21c11ac43d643.zip
Add static linkage to liby and libl
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile7
1 files changed, 5 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index 752994d..377e569 100644
--- a/Makefile
+++ b/Makefile
@@ -5,7 +5,8 @@ STATIC_OBJ = build/static/utils/string.o build/static/properties-parser.o build/
SHARED_OBJ = build/shared/utils/string.o build/shared/properties-parser.o build/shared/properties-lexer.o
CFLAGS = -DVERSION=
-LFLAGS = -ll -ly
+#LFLAGS = -ll -ly
+LFLAGS = -l:libl.a -l:liby.a
all: lib${NAME}.a lib${NAME}.so
@@ -21,7 +22,9 @@ properties-parser.h properties-parser.c: properties.y
@mv y.tab.h properties-parser.h
lib${NAME}.a: ${STATIC_OBJ}
- ${CC} ${STATIC_OBJ} -o $@ ${LFLAGS}
+ mkdir ext
+ cd ext && ar -x /usr/lib/liby.a && ar -x /usr/lib/libl.a
+ ar rcs $@ ${STATIC_OBJ} ext/*
lib${NAME}.so: ${SHARED_OBJ}
${CC} ${SHARED_OBJ} -o $@ ${LFLAGS}