Pass CFLAGS to protobuf-c-text
authorRobert Swiecki <robert@swiecki.net>
Sun, 28 May 2017 16:46:38 +0000 (18:46 +0200)
committerRobert Swiecki <robert@swiecki.net>
Sun, 28 May 2017 16:46:38 +0000 (18:46 +0200)
Makefile

index 006d3797a97bd21d6864d8855ec5f371a3429709..bd08d6595d85bde6f971ef2cb9bdb8ea178e6194 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -19,6 +19,8 @@
 
 CC ?= gcc
 
+EXTRA_CFLAGS := $(CFLAGS)
+
 CFLAGS += -O2 -c -std=gnu11 \
        -D_GNU_SOURCE \
        -Wformat -Wformat=2 -Wformat-security -fPIE \
@@ -90,7 +92,7 @@ kafel/libkafel.a:
        $(MAKE) -C kafel
 
 protobuf-c-text/protobuf-c-text/.libs/libprotobuf-c-text.a:
-       sh -c "cd protobuf-c-text; CFLAGS=\"-fPIC\" ./autogen.sh;"
+       sh -c "cd protobuf-c-text; CFLAGS=\"$(EXTRA_CFLAGS)\" ./autogen.sh;"
        $(MAKE) -C protobuf-c-text
 
 $(PROTO_DEPS): config.proto