blob: a084b3f1e10c0318301e0772c120384f49a50f81 [file] [log] [blame]
include $(COMMON_BASE_MK)
NAME=pppd
SRC_DIR=ppp-2.5.0
INSTALL_DIR=$(APP_DIR)/$(NAME)/install
BUILD_DIR=build
GEN_MAKEFILE=$(BUILD_DIR)/Makefile
export PATH := $(APP_DIR)/$(NAME)/depends/install/bin:$(PATH)
export DEPENDS_OLD = /home/zhouguopo/code2/0616/ap/project/zx297520v3/prj_mdl/build/../../../../build/depends
export DEPENDS_NEW = $(APP_DIR)/$(NAME)/depends
CONFIG_OPTS = --host=arm-linux
CONFIG_OPTS += --disable-silent-rules
CONFIG_OPTS += --disable-dependency-tracking
CONFIG_OPTS += --with-openssl=$(LIB_DIR)/libssl/install
#CONFIG_OPTS += --with-sysroot=$(CROSS_COMPILE_SYSROOT)
#CONFIG_OPTS += --enable-lzo
#CONFIG_OPTS += --disable-plugin-auth-pam
#CONFIG_OPTS += --disable-plugin-down-root
#CONFIG_OPTS += --with-crypto-library=openssl
#CFLAGS += -I$(LIB_DIR)/liblzo/install/include
#CFLAGS += -I$(LIB_DIR)/libssl/install/include
CFLAGS += -I$(LIB_DIR)/libssl/install/include
CFLAGS += -I../include
CFLAGS += -I$(APP_DIR)/include
#LDFLAGS += -L$(LIB_DIR)/liblzo/install/lib
#LDFLAGS += -L$(LIB_DIR)/libssl/install/lib
#LDFLAGS += -ldl
LDFLAGS += -pthread
LDFLAGS += -L$(LIB_DIR)/libnvram/ -lnvram
LDFLAGS += -L$(LIB_DIR)/libsoft_timer/ -lsoft_timer
LDFLAGS += -L$(LIB_DIR)/libsoftap/ -lsoftap
all: $(GEN_MAKEFILE)
make -C build all
make -C build install
$(GEN_MAKEFILE):
-find depends -type f -exec sed -i 's@$(DEPENDS_OLD)@$(DEPENDS_NEW)@g' {} +
mkdir -p $(BUILD_DIR)
cd $(BUILD_DIR); ../$(SRC_DIR)/configure --prefix=$(INSTALL_DIR) $(CONFIG_OPTS)
clean:
-rm -fr $(BUILD_DIR) $(INSTALL_DIR)
romfs:
$(ROMFSINST) $(INSTALL_DIR)/sbin/pppd /sbin/pppd