2006-11-28 17:59:17 +01:00
|
|
|
#############################################################
|
|
|
|
#
|
|
|
|
# openswan
|
|
|
|
#
|
|
|
|
# NOTE: Uses start-stop-daemon in init script, so be sure
|
|
|
|
# to enable that within busybox
|
|
|
|
#
|
|
|
|
#############################################################
|
2007-09-18 15:02:25 +02:00
|
|
|
OPENSWAN_VERSION:=2.4.9
|
2006-11-28 17:59:17 +01:00
|
|
|
OPENSWAN_SOURCE:=openswan-$(OPENSWAN_VERSION).tar.gz
|
2009-01-16 14:21:33 +01:00
|
|
|
OPENSWAN_SITE:=http://www.openswan.org/download/old/
|
2006-11-28 17:59:17 +01:00
|
|
|
OPENSWAN_DIR:=$(BUILD_DIR)/openswan-$(OPENSWAN_VERSION)
|
|
|
|
OPENSWAN_CAT:=$(ZCAT)
|
2006-11-29 21:51:47 +01:00
|
|
|
OPENSWAN_BINARY:=programs/pluto/pluto
|
|
|
|
OPENSWAN_TARGET_BINARY:=usr/sbin/ipsec
|
2006-11-28 17:59:17 +01:00
|
|
|
|
2006-12-22 12:29:52 +01:00
|
|
|
ifneq ($(BR2_PACKAGE_OPENSWAN_DEBUGGING),y)
|
|
|
|
OPENSWAN_CFLAGS=-UDEBUG -DNO_DEBUG -ULEAK_DETECTIVE
|
|
|
|
endif
|
|
|
|
|
2006-11-28 17:59:17 +01:00
|
|
|
$(DL_DIR)/$(OPENSWAN_SOURCE):
|
2009-01-16 12:42:52 +01:00
|
|
|
$(call DOWNLOAD,$(OPENSWAN_SITE),$(OPENSWAN_SOURCE))
|
2006-11-28 17:59:17 +01:00
|
|
|
|
|
|
|
openswan-source: $(DL_DIR)/$(OPENSWAN_SOURCE)
|
|
|
|
|
|
|
|
$(OPENSWAN_DIR)/.unpacked: $(DL_DIR)/$(OPENSWAN_SOURCE)
|
|
|
|
$(OPENSWAN_CAT) $(DL_DIR)/$(OPENSWAN_SOURCE) | tar -C $(BUILD_DIR) $(TAR_OPTIONS) -
|
2006-11-29 14:21:28 +01:00
|
|
|
toolchain/patch-kernel.sh $(OPENSWAN_DIR) package/openswan/ openswan\*.patch
|
2006-11-28 17:59:17 +01:00
|
|
|
touch $(OPENSWAN_DIR)/.unpacked
|
|
|
|
|
2006-12-14 16:36:12 +01:00
|
|
|
$(OPENSWAN_DIR)/$(OPENSWAN_BINARY): $(OPENSWAN_DIR)/.unpacked
|
2006-12-22 12:29:52 +01:00
|
|
|
@echo "using kernel $(LINUX_KERNEL)"
|
2006-11-28 17:59:17 +01:00
|
|
|
$(TARGET_CONFIGURE_OPTS) \
|
|
|
|
$(MAKE) -C $(OPENSWAN_DIR) \
|
2007-09-18 15:02:25 +02:00
|
|
|
CC="$(TARGET_CC)" LD="$(TARGET_LD)" \
|
|
|
|
LDFLAGS="$(TARGET_LDFLAGS) $(BR2_SYSROOT)" \
|
|
|
|
LD_LIBRARY_PATH= \
|
2006-11-29 21:51:47 +01:00
|
|
|
KERNELSRC=$(LINUX_DIR) DESTDIR=$(TARGET_DIR) INC_USRLOCAL=/usr \
|
2007-09-18 15:02:25 +02:00
|
|
|
USERCOMPILE="$(OPENSWAN_CFLAGS) $(TARGET_CFLAGS) $(BR2_ISYSROOT) -I$(TARGET_DIR)/usr/include" programs
|
2006-11-28 17:59:17 +01:00
|
|
|
|
|
|
|
$(TARGET_DIR)/$(OPENSWAN_TARGET_BINARY): $(OPENSWAN_DIR)/$(OPENSWAN_BINARY)
|
|
|
|
$(TARGET_CONFIGURE_OPTS) \
|
|
|
|
$(MAKE) -C $(OPENSWAN_DIR) \
|
2007-02-15 13:30:15 +01:00
|
|
|
CC=$(TARGET_CC) LD=$(TARGET_LD) \
|
2006-11-29 21:51:47 +01:00
|
|
|
KERNELSRC=$(LINUX_DIR) DESTDIR=$(TARGET_DIR) INC_USRLOCAL=/usr \
|
2007-02-15 13:30:15 +01:00
|
|
|
USERCOMPILE="$(OPENSWAN_CFLAGS) $(TARGET_CFLAGS) -I$(TARGET_DIR)/usr/include" install
|
2006-11-28 17:59:17 +01:00
|
|
|
rm -rf $(TARGET_DIR)/share/locale $(TARGET_DIR)/usr/info \
|
|
|
|
$(TARGET_DIR)/usr/man $(TARGET_DIR)/usr/share/doc
|
|
|
|
|
|
|
|
openswan: uclibc libgmp kernel-headers $(TARGET_DIR)/$(OPENSWAN_TARGET_BINARY)
|
|
|
|
|
|
|
|
openswan-clean:
|
|
|
|
$(MAKE) DESTDIR=$(TARGET_DIR) -C $(OPENSWAN_DIR) uninstall
|
|
|
|
-$(MAKE) -C $(OPENSWAN_DIR) clean
|
|
|
|
|
|
|
|
openswan-dirclean:
|
|
|
|
rm -rf $(OPENSWAN_DIR)
|
|
|
|
|
|
|
|
#############################################################
|
|
|
|
#
|
|
|
|
# Toplevel Makefile options
|
|
|
|
#
|
|
|
|
#############################################################
|
2008-12-08 09:15:27 +01:00
|
|
|
ifeq ($(BR2_PACKAGE_OPENSWAN),y)
|
2006-11-28 17:59:17 +01:00
|
|
|
TARGETS+=openswan
|
|
|
|
endif
|