px5g: Fix TARGET_LDFLAGS and add TARGET_CPPFLAGS
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>
(cherry picked from commit 306ee64361)
			
			
This commit is contained in:
		 Florian Fainelli
					Florian Fainelli
				
			
				
					committed by
					
						 Jo-Philipp Wich
						Jo-Philipp Wich
					
				
			
			
				
	
			
			
			 Jo-Philipp Wich
						Jo-Philipp Wich
					
				
			
						parent
						
							12b811a609
						
					
				
				
					commit
					c6dd059a9a
				
			| @@ -47,7 +47,7 @@ define Build/Prepare | |||||||
| 	mkdir -p $(PKG_BUILD_DIR) | 	mkdir -p $(PKG_BUILD_DIR) | ||||||
| endef | endef | ||||||
|  |  | ||||||
| TARGET_LDFLAGS := -lmbedtls -lmbedx509 -lmbedcrypto | TARGET_LDFLAGS += -lmbedtls -lmbedx509 -lmbedcrypto | ||||||
|  |  | ||||||
| ifeq ($(BUILD_VARIANT),standalone) | ifeq ($(BUILD_VARIANT),standalone) | ||||||
|   TARGET_LDFLAGS := -Wl,-Bstatic $(TARGET_LDFLAGS) -Wl,-Bdynamic |   TARGET_LDFLAGS := -Wl,-Bstatic $(TARGET_LDFLAGS) -Wl,-Bdynamic | ||||||
| @@ -56,7 +56,7 @@ endif | |||||||
| TARGET_CFLAGS += -Wl,--gc-sections | TARGET_CFLAGS += -Wl,--gc-sections | ||||||
|  |  | ||||||
| define Build/Compile | 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 | endef | ||||||
|  |  | ||||||
| define Package/px5g-mbedtls/install | define Package/px5g-mbedtls/install | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user