Explorar o código

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)
(cherry picked from commit e5978c182e4bd5d5c1d723d00e9f54ea958816c8)
Andrei Pelinescu-Onciul %!s(int64=15) %!d(string=hai) anos
pai
achega
3ed79ac954
Modificáronse 1 ficheiros con 19 adicións e 4 borrados
  1. 19 4
      utils/sercmd/Makefile

+ 19 - 4
utils/sercmd/Makefile

@@ -29,14 +29,29 @@ DEFS:= -DNAME='"$(NAME)"' -DVERSION='"$(RELEASE)"' \
 # from a module Makefile)
 # from a module Makefile)
 #LIBS:=$(filter-out -lfl  -ldl -lpthread -lssl -lcrypto, $(LIBS))
 #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)
 ifeq  ($(OS), dragonfly)
 	LIBS:= -L$(LOCALBASE)/lib
 	LIBS:= -L$(LOCALBASE)/lib
-else
+endif
+ifeq ($(OS), openbsd)
+	LIBS:=
+endif
+ifeq ($(OS), netbsd)
+	LIBS:=
+endif
+ifeq ($(OS), darwin)
 	LIBS:= -lresolv
 	LIBS:= -lresolv
 endif
 endif
-
-ifeq  ($(OS), solaris)
-	LIBS+= -L$(LOCALBASE)/lib -lxnet -lnsl
+ifneq (,$(findstring cygwin, $(OS)))
+	LIBS:= -lresolv
 endif
 endif
 
 
 ifeq ($(use_readline),)
 ifeq ($(use_readline),)