summaryrefslogtreecommitdiffstats
path: root/make
diff options
context:
space:
mode:
authorEric Andersen <andersen@codepoet.org>2002-11-18 23:20:10 +0000
committerEric Andersen <andersen@codepoet.org>2002-11-18 23:20:10 +0000
commit674022331daa839d779985e1698179a6daceac0b (patch)
treee0d34b382cc8664a85cd6923617ab949779318e0 /make
parent1805718d2edf36a5d955b100f1dbbd5be686166d (diff)
downloadbuildroot-novena-674022331daa839d779985e1698179a6daceac0b.tar.gz
buildroot-novena-674022331daa839d779985e1698179a6daceac0b.zip
Another addition from Jon Nelson
Diffstat (limited to 'make')
-rw-r--r--make/socat.mk49
1 files changed, 49 insertions, 0 deletions
diff --git a/make/socat.mk b/make/socat.mk
new file mode 100644
index 000000000..cf32e6f69
--- /dev/null
+++ b/make/socat.mk
@@ -0,0 +1,49 @@
+#############################################################
+#
+# socat
+#
+#############################################################
+
+SOCAT_VERSION=1.3.0.1
+
+# Don't alter below this line unless you (think) you know
+# what you are doing! Danger, Danger!
+
+SOCAT_SOURCE=socat-$(SOCAT_VERSION).tar.bz2
+SOCAT_SITE=http://www.dest-unreach.org/socat/download/
+#SOCAT_DIR=$(BUILD_DIR)/${shell basename $(SOCAT_SOURCE) .tar.bz2}
+SOCAT_DIR=$(BUILD_DIR)/socat-1.3
+#SOCAT_WORKDIR=$(BUILD_DIR)/socat_workdir
+SOCAT_WORKDIR=$(SOCAT_DIR)
+
+$(DL_DIR)/$(SOCAT_SOURCE):
+ wget -P $(DL_DIR) $(SOCAT_SITE)/$(SOCAT_SOURCE)
+
+$(SOCAT_DIR)/.unpacked: $(DL_DIR)/$(SOCAT_SOURCE)
+ bzip2 -d -c $(DL_DIR)/$(SOCAT_SOURCE) | tar -C $(BUILD_DIR) -xvf -
+ touch $(SOCAT_DIR)/.unpacked
+
+$(SOCAT_WORKDIR)/Makefile: $(TARGET_CC) $(SOCAT_DIR)/.unpacked
+ rm -f $(SOCAT_WORKDIR)/Makefile
+ mkdir -p $(SOCAT_WORKDIR)
+ (cd $(SOCAT_WORKDIR) && CONFIG_SITE=$(SOURCE_DIR)/socat-config.site-$(ARCH) \
+ CC=$(TARGET_CC) $(SOCAT_DIR)/configure --prefix=/usr)
+
+$(SOCAT_WORKDIR)/socat: $(SOCAT_WORKDIR)/Makefile
+ rm -f $@
+ $(MAKE) -C $(SOCAT_WORKDIR)
+
+$(SOCAT_WORKDIR)/.installed: $(SOCAT_WORKDIR)/socat
+ mkdir -p $(TARGET_DIR)/usr/man/man1
+ $(MAKE) -C $(SOCAT_WORKDIR) install prefix=$(TARGET_DIR)/usr
+
+socat: uclibc $(SOCAT_WORKDIR)/.installed
+
+socat-clean:
+ @if [ -d $(SOCAT_WORKDIR)/Makefile ] ; then \
+ $(MAKE) -C $(SOCAT_WORKDIR) clean ; \
+ fi;
+
+socat-dirclean:
+ rm -rf $(SOCAT_DIR) $(SOCAT_WORKDIR)
+