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).
(cherry picked from commit b0f00c3348b9c1429f6df5b39dcbd1ca939e9dfc)
Andrei Pelinescu-Onciul 16 năm trước cách đây
mục cha
commit
bf31febc3f
1 tập tin đã thay đổi với 9 bổ sung1 xóa
  1. 9 1
      utils/sercmd/Makefile

+ 9 - 1
utils/sercmd/Makefile

@@ -24,7 +24,15 @@ endif #ifneq (,$(MAKECMDGOALS))
 C_DEFS:=
 C_DEFS:=
 DEFS:= -DNAME='"$(NAME)"' -DVERSION='"$(RELEASE)"' \
 DEFS:= -DNAME='"$(NAME)"' -DVERSION='"$(RELEASE)"' \
 		$(filter -D%HAVE -DARCH% -DOS% -D__CPU% -D__OS%, $(DEFS))
 		$(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),)
 ifeq ($(use_readline),)
 readline_path := $(shell  \
 readline_path := $(shell  \