px5g: Fix TARGET_LDFLAGS and add TARGET_CPPFLAGS
authorFlorian Fainelli <f.fainelli@gmail.com>
Sun, 12 Feb 2017 22:07:36 +0000 (14:07 -0800)
committerFlorian Fainelli <f.fainelli@gmail.com>
Thu, 2 Mar 2017 01:19:51 +0000 (17:19 -0800)
Make sure we pass down TARGET_CPPFLAGS to let toolchains with no default
search paths to find the mbdetls headers, and override TARGET_LDFLAGS to
include libraries we are linking against.

Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
package/utils/px5g/Makefile

index 6fd73e3a48a89b3565d5b620105274e910bdbed0..8d1f04d60fb8403d4b50fc0ec469eedc7f0062eb 100644 (file)
@@ -47,7 +47,7 @@ define Build/Prepare
        mkdir -p $(PKG_BUILD_DIR)
 endef
 
        mkdir -p $(PKG_BUILD_DIR)
 endef
 
-TARGET_LDFLAGS := -lmbedtls -lmbedx509 -lmbedcrypto
+TARGET_LDFLAGS += -lmbedtls -lmbedx509 -lmbedcrypto
 
 ifeq ($(BUILD_VARIANT),standalone)
   TARGET_LDFLAGS := -Wl,-Bstatic $(TARGET_LDFLAGS) -Wl,-Bdynamic
 
 ifeq ($(BUILD_VARIANT),standalone)
   TARGET_LDFLAGS := -Wl,-Bstatic $(TARGET_LDFLAGS) -Wl,-Bdynamic
@@ -56,7 +56,7 @@ endif
 TARGET_CFLAGS += -Wl,--gc-sections
 
 define Build/Compile
 TARGET_CFLAGS += -Wl,--gc-sections
 
 define Build/Compile
-       $(TARGET_CC) $(TARGET_CFLAGS) -o $(PKG_BUILD_DIR)/px5g px5g.c $(TARGET_LDFLAGS)
+       $(TARGET_CC) $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) -o $(PKG_BUILD_DIR)/px5g px5g.c $(TARGET_LDFLAGS)
 endef
 
 define Package/px5g-mbedtls/install
 endef
 
 define Package/px5g-mbedtls/install