[CRIU] [PATCH 4/8] makefile: add ldflags-so

Ruslan Kuprieiev kupruser at gmail.com
Wed Dec 4 02:57:27 PST 2013


Signed-off-by: Ruslan Kuprieiev <kupruser at gmail.com>
---
 lib/Makefile           | 1 +
 scripts/Makefile.build | 2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/lib/Makefile b/lib/Makefile
index b3d4d39..e9beace 100644
--- a/lib/Makefile
+++ b/lib/Makefile
@@ -5,6 +5,7 @@ obj-ext-src-y		+= protobuf/rpc.pb-c.o
 includes		+= -iquote $(obj)/../arch/$(ARCH)/include -iquote $(obj)/../include -iquote $(obj)/.. -iquote $(obj)/../protobuf
 cflags-y		+= $(includes) -fPIC -Wa,--noexecstack -fno-stack-protector
 cflags-so		+= -rdynamic
+ldflags-so		+= -lprotobuf-c
 
 .SECONDARY:
 
diff --git a/scripts/Makefile.build b/scripts/Makefile.build
index afee94b..1c633d9 100644
--- a/scripts/Makefile.build
+++ b/scripts/Makefile.build
@@ -184,7 +184,7 @@ endif
 ifneq ($(lib-so),)
 $(obj)/$(lib-so).so: $(all-objs) $(libs-e)
 	$(E) "  LINK    " $@
-	$(Q) $(CC) -shared $(cflags-so) -o $@ $^
+	$(Q) $(CC) -shared $(cflags-so) -o $@ $^ $(ldflags-so)
 
 _all += $(obj)/$(lib-so).so
 cleanup-y += $(obj)/$(lib-so).so
-- 
1.8.1.2



More information about the CRIU mailing list