view src/of-sockets-1-fixes.patch @ 3721:933b99febcf1

Expand options to support 3 possible sources of octave * configure.ac: modify --enable-stable rule to --enable-octave=source (stable,alpha,default) * Makefile.am: modify OCTAVE_TARGET based on octave build value set in configure. * index.html: added master-octave information. * src/default-octave.mk: new file. * src/default-octave-1-docinstall.patch * dist-files.mk: add default-octave-1-docinstall.patch default-octave.mk * binary-dist-rules.mk: use OCTAVE_TARGET to decide on tarball/installer name
author John Donoghue <john.donoghue@ieee.org>
date Sun, 19 Oct 2014 22:58:20 -0400
parents 4c7ad30fe8a9
children
line wrap: on
line source

diff -ur sockets.orig/src/Makefile sockets/src/Makefile
--- sockets.orig/src/Makefile	2014-01-03 08:34:47.000000000 -0500
+++ sockets/src/Makefile	2014-01-03 09:18:19.000000000 -0500
@@ -1,6 +1,11 @@
 OCT = sockets.oct
 SRC := $(OCT:.oct=.cc)
 
+EXTRALIBS = 
+ifeq ($(OS),Windows_NT)
+  EXTRALIBS = -lws2_32
+endif
+
 #See which octave version we run by querying mkoctfile for its version
 #string. (Is there a better way to do this? This looks horrible.) 
 majorversion := $(shell  mkoctfile --version 2>&1  | sed  -e 's/[ .+]/\n/g' |sed  -n '3p')
@@ -14,7 +19,7 @@
 all: $(OCT)
 
 %.oct: %.cc
-	mkoctfile $(VFLAGS) -s $<
+	mkoctfile $(VFLAGS) -s $< $(EXTRALIBS)
 
 test: $(OCT)
 	test_octave_sockets