2002-11-19 00:20:10 +01:00
|
|
|
#############################################################
|
|
|
|
#
|
|
|
|
# socat
|
|
|
|
#
|
|
|
|
#############################################################
|
|
|
|
|
2009-01-02 09:29:31 +01:00
|
|
|
#SOCAT_MAJOR_VERSION=1.4
|
|
|
|
#SOCAT_MINOR_VERSION=.0.3
|
|
|
|
SOCAT_MAJOR_VERSION=2.0.0-b2
|
|
|
|
SOCAT_MINOR_VERSION=
|
2002-11-19 00:20:10 +01:00
|
|
|
|
|
|
|
# Don't alter below this line unless you (think) you know
|
|
|
|
# what you are doing! Danger, Danger!
|
|
|
|
|
2009-01-02 09:29:31 +01:00
|
|
|
SOCAT_SOURCE=socat-$(SOCAT_MAJOR_VERSION)$(SOCAT_MINOR_VERSION).tar.bz2
|
2006-11-17 16:43:51 +01:00
|
|
|
SOCAT_CAT:=$(BZCAT)
|
2002-11-19 00:20:10 +01:00
|
|
|
SOCAT_SITE=http://www.dest-unreach.org/socat/download/
|
|
|
|
#SOCAT_DIR=$(BUILD_DIR)/${shell basename $(SOCAT_SOURCE) .tar.bz2}
|
2009-01-02 09:29:31 +01:00
|
|
|
SOCAT_DIR=$(BUILD_DIR)/socat-$(SOCAT_MAJOR_VERSION)
|
2002-11-19 00:20:10 +01:00
|
|
|
#SOCAT_WORKDIR=$(BUILD_DIR)/socat_workdir
|
|
|
|
SOCAT_WORKDIR=$(SOCAT_DIR)
|
|
|
|
|
2009-01-02 09:29:31 +01:00
|
|
|
# SOCAT Configure opts taken from Config/config.Linux-2.6.24.h
|
2009-07-30 17:31:51 +02:00
|
|
|
CRDLY_SHIFT := $(call qstrip,$(BR2_PACKAGE_SOCAT_PREDEF_CRDLY_SHIFT))
|
|
|
|
TABDLY_SHIFT := $(call qstrip,$(BR2_PACKAGE_SOCAT_PREDEF_TABDLY_SHIFT))
|
|
|
|
CSIZE_SHIFT := $(call qstrip,$(BR2_PACKAGE_SOCAT_PREDEF_CSIZE_SHIFT))
|
2009-01-02 09:29:31 +01:00
|
|
|
|
|
|
|
SOCAT_CONFIGURE_OPTS :=
|
|
|
|
ifneq ($(CRDLY_SHIFT),)
|
|
|
|
SOCAT_CONFIGURE_OPTS += sc_cv_sys_crdly_shift=$(CRDLY_SHIFT)
|
|
|
|
endif
|
|
|
|
ifneq ($(TABDLY_SHIFT),)
|
|
|
|
SOCAT_CONFIGURE_OPTS += sc_cv_sys_tabdly_shift=$(TABDLY_SHIFT)
|
|
|
|
endif
|
|
|
|
ifneq ($(CRDLY_SHIFT),)
|
|
|
|
SOCAT_CONFIGURE_OPTS += sc_cv_sys_csize_shift=$(CSIZE_SHIFT)
|
|
|
|
endif
|
|
|
|
|
2002-11-19 00:20:10 +01:00
|
|
|
$(DL_DIR)/$(SOCAT_SOURCE):
|
2009-01-16 12:42:52 +01:00
|
|
|
$(call DOWNLOAD,$(SOCAT_SITE),$(SOCAT_SOURCE))
|
2002-11-19 00:20:10 +01:00
|
|
|
|
2007-08-20 19:21:16 +02:00
|
|
|
$(SOCAT_DIR)/.unpacked: $(DL_DIR)/$(SOCAT_SOURCE)
|
2006-11-17 16:43:51 +01:00
|
|
|
$(SOCAT_CAT) $(DL_DIR)/$(SOCAT_SOURCE) | tar -C $(BUILD_DIR) $(TAR_OPTIONS) -
|
2009-01-02 09:29:31 +01:00
|
|
|
toolchain/patch-kernel.sh $(SOCAT_DIR) package/socat/ socat-$(SOCAT_MAJOR_VERSION)\*.patch
|
2002-11-19 00:20:10 +01:00
|
|
|
touch $(SOCAT_DIR)/.unpacked
|
|
|
|
|
2003-01-19 07:07:22 +01:00
|
|
|
$(SOCAT_WORKDIR)/Makefile: $(SOCAT_DIR)/.unpacked
|
2002-11-19 00:20:10 +01:00
|
|
|
rm -f $(SOCAT_WORKDIR)/Makefile
|
|
|
|
mkdir -p $(SOCAT_WORKDIR)
|
2003-01-17 09:03:59 +01:00
|
|
|
(cd $(SOCAT_WORKDIR); rm -rf config.cache; \
|
2003-03-04 20:16:19 +01:00
|
|
|
$(TARGET_CONFIGURE_OPTS) \
|
2007-06-27 14:01:27 +02:00
|
|
|
$(TARGET_CONFIGURE_ARGS) \
|
2009-01-02 09:29:31 +01:00
|
|
|
$(SOCAT_CONFIGURE_OPTS) \
|
2009-10-01 21:24:42 +02:00
|
|
|
$(SOCAT_DIR)/configure $(QUIET) \
|
2003-01-17 09:03:59 +01:00
|
|
|
--target=$(GNU_TARGET_NAME) \
|
2003-03-04 20:16:19 +01:00
|
|
|
--host=$(GNU_TARGET_NAME) \
|
|
|
|
--build=$(GNU_HOST_NAME) \
|
2003-01-17 09:03:59 +01:00
|
|
|
--prefix=/usr \
|
|
|
|
--exec-prefix=/usr \
|
|
|
|
--bindir=/usr/bin \
|
|
|
|
--sbindir=/usr/sbin \
|
2007-01-14 04:52:21 +01:00
|
|
|
--libdir=/lib \
|
2003-01-17 09:03:59 +01:00
|
|
|
--libexecdir=/usr/lib \
|
|
|
|
--sysconfdir=/etc \
|
|
|
|
--datadir=/usr/share \
|
|
|
|
--localstatedir=/var \
|
|
|
|
--mandir=/usr/man \
|
|
|
|
--infodir=/usr/info \
|
2004-10-26 17:04:15 +02:00
|
|
|
--disable-termios \
|
|
|
|
$(DISABLE_NLS); \
|
|
|
|
$(SED) 's/#define HAVE_TERMIOS_ISPEED 1/#undef HAVE_TERMIOS_ISPEED/g' config.h; \
|
2007-08-21 21:20:18 +02:00
|
|
|
)
|
2007-08-22 14:35:41 +02:00
|
|
|
|
2009-01-02 09:29:31 +01:00
|
|
|
# cp $(SOCAT_WORKDIR)/Config/config.Linux-2-6*.h $(SOCAT_WORKDIR)/config.h ; \
|
|
|
|
|
|
|
|
|
2007-08-20 19:21:16 +02:00
|
|
|
$(SOCAT_WORKDIR)/socat: $(SOCAT_WORKDIR)/Makefile
|
2002-11-19 00:20:10 +01:00
|
|
|
rm -f $@
|
|
|
|
$(MAKE) -C $(SOCAT_WORKDIR)
|
|
|
|
|
2008-03-27 16:42:42 +01:00
|
|
|
$(TARGET_DIR)/usr/bin/socat: $(SOCAT_WORKDIR)/socat
|
2002-11-19 00:20:10 +01:00
|
|
|
mkdir -p $(TARGET_DIR)/usr/man/man1
|
2006-01-24 16:15:16 +01:00
|
|
|
$(MAKE) -C $(SOCAT_WORKDIR) install prefix=$(TARGET_DIR)/usr DESTDIR=$(TARGET_DIR)
|
2007-07-17 14:04:36 +02:00
|
|
|
touch $@
|
2002-11-19 00:20:10 +01:00
|
|
|
|
2009-09-02 17:02:02 +02:00
|
|
|
socat: $(TARGET_DIR)/usr/bin/socat
|
2002-11-19 00:20:10 +01:00
|
|
|
|
2003-11-12 10:31:12 +01:00
|
|
|
socat-source: $(DL_DIR)/$(SOCAT_SOURCE)
|
|
|
|
|
2002-11-19 00:20:10 +01:00
|
|
|
socat-clean:
|
2008-03-27 16:42:42 +01:00
|
|
|
-$(MAKE) -C $(SOCAT_WORKDIR) clean
|
|
|
|
rm -f $(TARGET_DIR)/usr/bin/{socat,filan,procan}
|
2002-11-19 00:20:10 +01:00
|
|
|
|
|
|
|
socat-dirclean:
|
|
|
|
rm -rf $(SOCAT_DIR) $(SOCAT_WORKDIR)
|
|
|
|
|
2005-02-10 04:06:39 +01:00
|
|
|
#############################################################
|
|
|
|
#
|
|
|
|
# Toplevel Makefile options
|
|
|
|
#
|
|
|
|
#############################################################
|
2008-12-08 09:15:27 +01:00
|
|
|
ifeq ($(BR2_PACKAGE_SOCAT),y)
|
2005-02-10 04:06:39 +01:00
|
|
|
TARGETS+=socat
|
|
|
|
endif
|