From 081b5b333086df9324164adeae92e18625574d6c Mon Sep 17 00:00:00 2001 From: Erik Ekman Date: Sat, 12 Jul 2008 12:42:19 +0000 Subject: [PATCH] Add extra ldflags for solaris --- src/Makefile | 2 +- src/osflags | 14 ++++++++++++++ 2 files changed, 15 insertions(+), 1 deletion(-) create mode 100755 src/osflags diff --git a/src/Makefile b/src/Makefile index eca134f..c397f1d 100644 --- a/src/Makefile +++ b/src/Makefile @@ -8,7 +8,7 @@ SERVER = ../bin/iodined OS = `uname | tr "a-z" "A-Z"` ARCH = `uname -m` -LDFLAGS = -lz +LDFLAGS = -lz `sh osflags link` CFLAGS = -c -g -Wall -D$(OS) -pedantic all: stateos $(CLIENT) $(SERVER) diff --git a/src/osflags b/src/osflags new file mode 100755 index 0000000..693fa86 --- /dev/null +++ b/src/osflags @@ -0,0 +1,14 @@ +#!/bin/sh + +case $1 in +link) + + case $OSTYPE in + SunOS | solaris) + echo '-lsocket -lnsl'; + ;; + esac + ;; +*) +;; +esac