Added SOLARIS_VERSION so uname executed not executed on each compile line.

This commit is contained in:
Janet B. Anderson
2002-10-24 19:05:49 +00:00
parent 64da98ffd3
commit a7930cdaa0

View File

@@ -13,20 +13,21 @@ include $(CONFIG)/os/CONFIG.Common.UnixCommon
OS_CLASS = solaris
ARCH_CLASS = sparc
CODE_CPPFLAGS = -D__EXTENSIONS__
CODE_CPPFLAGS = -D__EXTENSIONS__
# This is the only combination of posix threads flags that works with solaris 6
####POSIX_CPPFLAGS_YES = -D_REENTRANT -D_POSIX_C_SOURCE=199506L
####POSIX_LDLIBS_YES += -lposix4 -lpthread -lthread
SOLARIS_VERSION = $(subst 5.,,$(shell uname -r))
# This set of flags is recommended by sun for posix threads and works with solaris 8
POSIX_CPPFLAGS_YES = -D_POSIX_C_SOURCE=199506L
POSIX_LDLIBS_YES += -lposix4 -lpthread
# Flags for solaris 6
POSIX_CPPFLAGS_YES_6 += -D_REENTRANT
POSIX_LDLIBS_YES_6 += -lthread
POSIX_CPPFLAGS_NO =
POSIX_CPPFLAGS_YES += -D_POSIX_C_SOURCE=199506L $(POSIX_CPPFLAGS_YES_$(SOLARIS_VERSION))
POSIX_LDLIBS_YES += -lposix4 -lpthread $(POSIX_LDLIBS_YES_$(SOLARIS_VERSION))
POSIX_CPPFLAGS_NO +=
POSIX_LDLIBS_NO +=
OP_SYS_CPPFLAGS = -DSOLARIS=$(subst 5.,,$(shell uname -r))
OP_SYS_CPPFLAGS += -DSOLARIS=$(SOLARIS_VERSION)
# socket and nsl needed by libca.a
OP_SYS_LDLIBS += -lsocket -lnsl
@@ -40,6 +41,9 @@ ifdef CROSS
CMPLR_PREFIX=$(addsuffix -,$(GNU_TARGET))
endif
#Allow R3.13 built extensions to load R3.14 shared libs
SYS_SHRLIB_LIBS += posix4 pthread Crun
# Lib for solaris 8
SYS_SHRLIB_LIBS_8 += Crun
#Allow R3.13 built extensions to load R3.14 shared libs
SYS_SHRLIB_LIBS += posix4 pthread $(SYS_SHRLIB_LIBS_$(SOLARIS_VERSION))