Browse Source

sercmd: fix LIBS when installing from a module

Don't rely on LIBS having a valid value, since we might get called
from a module Makefile. Use needed libs in function of $(OS).
Andrei Pelinescu-Onciul 16 years ago
parent
commit
b0f00c3348
1 changed files with 9 additions and 1 deletions
  1. 9 1
      utils/sercmd/Makefile

+ 9 - 1
utils/sercmd/Makefile

@@ -24,7 +24,15 @@ endif #ifneq (,$(MAKECMDGOALS))
 C_DEFS:=
 DEFS:= -DNAME='"$(NAME)"' -DVERSION='"$(RELEASE)"' \
 		$(filter -D%HAVE -DARCH% -DOS% -D__CPU% -D__OS%, $(DEFS))
-LIBS:=$(filter-out -lfl  -ldl -lpthread -lssl -lcrypto, $(LIBS))
+
+# use proper libs (we can't rely on LIBS value since we might be called
+# from a module Makefile)
+#LIBS:=$(filter-out -lfl  -ldl -lpthread -lssl -lcrypto, $(LIBS))
+
+LIBS:= -lresolv
+ifeq  ($(OS), solaris)
+	LIBS+= -L$(LOCALBASE)/lib -lxnet -lnsl
+endif
 
 ifeq ($(use_readline),)
 readline_path := $(shell  \