projects
/
clsql.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Version 6.7.0 release
[clsql.git]
/
uffi
/
Makefile
diff --git
a/uffi/Makefile
b/uffi/Makefile
index b24f37603a49f73be9c53a631f37938417192a74..7599380f1c047befc356d12833a898ef84cdaad2 100644
(file)
--- a/
uffi/Makefile
+++ b/
uffi/Makefile
@@
-23,6
+23,12
@@
shared_lib=$(base).so
shared64_lib=$(base)64.so
dylib=$(base).dylib
shared64_lib=$(base)64.so
dylib=$(base).dylib
+ifneq ($(OS_DPKG_BUILDFLAGS),0)
+ CFLAGS:=$(CFLAGS) $(shell dpkg-buildflags --get CFLAGS)
+ LDFLAGS:=$(LDFLAGS) $(shell DEB_BUILD_MAINT_OPTIONS=hardening=+all,-pie dpkg-buildflags --get LDFLAGS | sed "s/-Wl\|,/ /ig")
+endif
+
+
.PHONY: all
all: $(shared_lib)
.PHONY: all
all: $(shared_lib)
@@
-48,12
+54,12
@@
else
ld -shared -soname=$(base) $(LDFLAGS) $(object) -o $(shared_lib)
else
ifneq ($(OS_LINUX64),0)
ld -shared -soname=$(base) $(LDFLAGS) $(object) -o $(shared_lib)
else
ifneq ($(OS_LINUX64),0)
- gcc -fPIC -DPIC -c $(source) -o $(object)
-
ld -shared
-soname=$(base) -lc $(object) -o $(shared64_lib)
+ gcc
$(CFLAGS)
-fPIC -DPIC -c $(source) -o $(object)
+
gcc $(LDFLAGS) -fPIC -shared -Wl,
-soname=$(base) -lc $(object) -o $(shared64_lib)
rm -f $(object)
@echo "Ensure that you have multiarch i386 build tools if you want to build 32-bit library"
rm -f $(object)
@echo "Ensure that you have multiarch i386 build tools if you want to build 32-bit library"
- -gcc -m32 -fPIC -DPIC -c $(source) -o $(object)
- -
ld -melf_i386 -shared
-soname=$(base) -lc $(object) -o $(shared_lib)
+ -gcc -m32
$(CFLAGS)
-fPIC -DPIC -c $(source) -o $(object)
+ -
gcc -m32 $(LDFLAGS) -fPIC -shared -Wl,
-soname=$(base) -lc $(object) -o $(shared_lib)
else
gcc -fPIC -DPIC -c $(source) -o $(object)
ld -shared -soname=$(base) -lc $(object) -o $(shared_lib)
else
gcc -fPIC -DPIC -c $(source) -o $(object)
ld -shared -soname=$(base) -lc $(object) -o $(shared_lib)