| |
| include $(COMMON_BASE_MK) |
| |
| NAME=openvpn |
| SRC_DIR=openvpn-2.4.4 |
| INSTALL_DIR=$(APP_DIR)/$(NAME)/install |
| BUILD_DIR=build |
| GEN_MAKEFILE=$(BUILD_DIR)/Makefile |
| |
| CONFIG_OPTS = --host=arm-linux |
| 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 |
| |
| LDFLAGS += -L$(LIB_DIR)/liblzo/install/lib |
| LDFLAGS += -L$(LIB_DIR)/libssl/install/lib |
| LDFLAGS += -ldl |
| |
| all: $(GEN_MAKEFILE) |
| make -C build all |
| make -C build install |
| |
| $(GEN_MAKEFILE): |
| 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/openvpn /sbin/openvpn |