(cd $(PKG_BUILD_DIR); rm -f config.cache; \
$(TARGET_CONFIGURE_OPTS) \
CFLAGS="$(TARGET_CFLAGS)" \
- CPPFLAGS="-I$(STAGING_DIR)/usr/include -I$(STAGING_DIR)/include" \
- LDFLAGS="-L$(STAGING_DIR)/usr/lib -L$(STAGING_DIR)/lib" \
+ CPPFLAGS="$(TARGET_CPPFLAGS)" \
+ LDFLAGS="$(TARGET_LDFLAGS)" \
./configure \
--target=$(GNU_TARGET_NAME) \
--host=$(GNU_TARGET_NAME) \
./Configure linux-openwrt \
--prefix=/usr \
--openssldir=/etc/ssl \
- -I$(STAGING_DIR)/usr/include \
- -L$(STAGING_DIR)/usr/lib -ldl \
+ $(TARGET_CPPFLAGS) \
+ $(TARGET_LDFLAGS) -ldl \
-DOPENSSL_SMALL_FOOTPRINT \
$(OPENSSL_NO_CIPHERS) \
$(OPENSSL_OPTIONS) \