blob: a084b3f1e10c0318301e0772c120384f49a50f81 [file] [log] [blame]
lh9ed821d2023-04-07 01:36:19 -07001
xf.li84027492024-04-09 00:17:51 -07002include $(COMMON_BASE_MK)
lh9ed821d2023-04-07 01:36:19 -07003
xf.li84027492024-04-09 00:17:51 -07004NAME=pppd
5SRC_DIR=ppp-2.5.0
6INSTALL_DIR=$(APP_DIR)/$(NAME)/install
7BUILD_DIR=build
8GEN_MAKEFILE=$(BUILD_DIR)/Makefile
lh9ed821d2023-04-07 01:36:19 -07009
xf.li84027492024-04-09 00:17:51 -070010export PATH := $(APP_DIR)/$(NAME)/depends/install/bin:$(PATH)
11export DEPENDS_OLD = /home/zhouguopo/code2/0616/ap/project/zx297520v3/prj_mdl/build/../../../../build/depends
12export DEPENDS_NEW = $(APP_DIR)/$(NAME)/depends
13
14CONFIG_OPTS = --host=arm-linux
15CONFIG_OPTS += --disable-silent-rules
16CONFIG_OPTS += --disable-dependency-tracking
17CONFIG_OPTS += --with-openssl=$(LIB_DIR)/libssl/install
18#CONFIG_OPTS += --with-sysroot=$(CROSS_COMPILE_SYSROOT)
19#CONFIG_OPTS += --enable-lzo
20#CONFIG_OPTS += --disable-plugin-auth-pam
21#CONFIG_OPTS += --disable-plugin-down-root
22#CONFIG_OPTS += --with-crypto-library=openssl
23
24#CFLAGS += -I$(LIB_DIR)/liblzo/install/include
25#CFLAGS += -I$(LIB_DIR)/libssl/install/include
26CFLAGS += -I$(LIB_DIR)/libssl/install/include
27CFLAGS += -I../include
28CFLAGS += -I$(APP_DIR)/include
29
30#LDFLAGS += -L$(LIB_DIR)/liblzo/install/lib
31#LDFLAGS += -L$(LIB_DIR)/libssl/install/lib
32#LDFLAGS += -ldl
33LDFLAGS += -pthread
34LDFLAGS += -L$(LIB_DIR)/libnvram/ -lnvram
35LDFLAGS += -L$(LIB_DIR)/libsoft_timer/ -lsoft_timer
36LDFLAGS += -L$(LIB_DIR)/libsoftap/ -lsoftap
37
38
39all: $(GEN_MAKEFILE)
40 make -C build all
41 make -C build install
42
43$(GEN_MAKEFILE):
44 -find depends -type f -exec sed -i 's@$(DEPENDS_OLD)@$(DEPENDS_NEW)@g' {} +
45 mkdir -p $(BUILD_DIR)
46 cd $(BUILD_DIR); ../$(SRC_DIR)/configure --prefix=$(INSTALL_DIR) $(CONFIG_OPTS)
lh9ed821d2023-04-07 01:36:19 -070047
48clean:
xf.li84027492024-04-09 00:17:51 -070049 -rm -fr $(BUILD_DIR) $(INSTALL_DIR)
lh9ed821d2023-04-07 01:36:19 -070050
xf.li84027492024-04-09 00:17:51 -070051romfs:
52 $(ROMFSINST) $(INSTALL_DIR)/sbin/pppd /sbin/pppd
53