Module: sip-router
Branch: master
Commit: e5978c182e4bd5d5c1d723d00e9f54ea958816c8
URL:
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=e5978c1…
Author: Andrei Pelinescu-Onciul <andrei(a)iptel.org>
Committer: Andrei Pelinescu-Onciul <andrei(a)iptel.org>
Date: Wed Aug 11 18:51:09 2010 +0200
sercmd: fix LIBS - don't link -lresolv if not needed
- link with libresolv only on linux, solaris and darwin
- on solaris link also witl -lxnet and -lnsl
(bugs introduced in b0f00c3348b9)
---
utils/sercmd/Makefile | 23 +++++++++++++++++++----
1 files changed, 19 insertions(+), 4 deletions(-)
diff --git a/utils/sercmd/Makefile b/utils/sercmd/Makefile
index 7072a7d..bc03b74 100644
--- a/utils/sercmd/Makefile
+++ b/utils/sercmd/Makefile
@@ -29,14 +29,29 @@ DEFS:= -DNAME='"$(NAME)"'
-DVERSION='"$(RELEASE)"' \
# from a module Makefile)
#LIBS:=$(filter-out -lfl -ldl -lpthread -lssl -lcrypto, $(LIBS))
+ifeq ($(OS), linux)
+ LIBS:= -lresolv
+endif
+ifeq ($(OS), solaris)
+ LIBS:= -lresolv -L$(LOCALBASE)/lib -lxnet -lnsl
+endif
+ifeq ($(OS), freebsd)
+ LIBS:=
+endif
ifeq ($(OS), dragonfly)
LIBS:= -L$(LOCALBASE)/lib
-else
+endif
+ifeq ($(OS), openbsd)
+ LIBS:=
+endif
+ifeq ($(OS), netbsd)
+ LIBS:=
+endif
+ifeq ($(OS), darwin)
LIBS:= -lresolv
endif
-
-ifeq ($(OS), solaris)
- LIBS+= -L$(LOCALBASE)/lib -lxnet -lnsl
+ifneq (,$(findstring cygwin, $(OS)))
+ LIBS:= -lresolv
endif
ifeq ($(use_readline),)