cdev-1.7.2n
This commit is contained in:
@@ -0,0 +1,121 @@
|
||||
# ******************************************************************************
|
||||
# * Makefile.hpux-cl: This is the platform specific Makefile for HPUX using
|
||||
# * the CenterLine C++ compiler.
|
||||
# *
|
||||
# * Externals : This Makefile relies on the developer defining the
|
||||
# * following external definitions...
|
||||
# *
|
||||
# * CDEV : The base directory of the CDEV distribution
|
||||
# ******************************************************************************
|
||||
TARGET = hpux-cl
|
||||
SHOBJ = NO
|
||||
OS_MAJOR := $(shell uname -r | awk -F "." '{print $$2; exit}')
|
||||
OS_MAJOR_NUM := $(shell awk 'BEGIN {VAL=$(OS_MAJOR); print VAL; exit; }')
|
||||
OS_MINOR := $(shell uname -r | awk -F "." '{print $$3; exit}')
|
||||
OS_MINOR_NUM := $(shell awk 'BEGIN {VAL=$(OS_MINOR); print VAL; exit; }')
|
||||
OS_VERSION_DEF := -D_OS_MAJOR_=$(OS_MAJOR_NUM) -D_OS_MINOR_=$(OS_MINOR_NUM)
|
||||
|
||||
include $(CDEV)/extensions/cdevGenericServer/include/makeinclude/Makefile.common
|
||||
include $(CDEV)/include/makeinclude/Makefile.archive
|
||||
|
||||
ifeq ($(OS_MAJOR_NUM), 9)
|
||||
HP_FLAGS = -D_SELECT_USES_INT_
|
||||
endif
|
||||
|
||||
ifeq ($(OS_MAJOR_NUM), 10)
|
||||
HP_FLAGS = -Dvolatile=""
|
||||
NETLIBS = -lxti
|
||||
endif
|
||||
|
||||
# ******************************************************************************
|
||||
# * Platform specific compile and link options.
|
||||
# ******************************************************************************
|
||||
|
||||
# ******************************************************************************
|
||||
# * Only specify the DEBUGFLAG if the DEBUG variable has been set.
|
||||
# ******************************************************************************
|
||||
ifdef DEBUG
|
||||
DEBUGFLAG = -g
|
||||
endif
|
||||
|
||||
CXX = /usr/csite4/CenterLine/bin/CC
|
||||
CC = cc
|
||||
CXXFLAGS = -z -pta -D__CENTERLINE__ $(CXXEXTRA) $(CXXINCLUDES) $(CDEVINCLUDES) \
|
||||
$(BASEINCLUDES) $(OS_VERSION_DEF) $(DEBUGFLAG) $(HP_FLAGS) -DSYSV
|
||||
CFLAGS = -Aa $(CCEXTRA) $(CXXINCLUDES) $(CDEVINCLUDES) \
|
||||
$(BASEINCLUDES) $(OS_VERSION_DEF) $(DEBUGFLAG) -DSYSV
|
||||
LDFLAGS = -Wl,+s
|
||||
AR = ar
|
||||
ARFLAGS = ruv
|
||||
RANLIB = true
|
||||
DLD = $(CXX)
|
||||
SOFLAGS = -b
|
||||
PIC =
|
||||
SHARED_EXT = sl
|
||||
OSLIBS = -lm
|
||||
|
||||
|
||||
# ******************************************************************************
|
||||
# * These definitions define the names and locations of libraries that are
|
||||
# * required by CDEV for a shared and archive applications. The developer
|
||||
# * is required to add the list of service specific libraries.
|
||||
# ******************************************************************************
|
||||
ifeq ($(SHOBJ), NO)
|
||||
CDEVLIBS = $(CDEVLIB)/libcdev.a $(ARCHIVELIBS)
|
||||
else
|
||||
CDEVLIBS = -L$(CDEVLIB) -lcdev
|
||||
endif
|
||||
|
||||
|
||||
# ******************************************************************************
|
||||
# * Platform specific compile and link macros.
|
||||
# ******************************************************************************
|
||||
COMPILE.cc = $(QUIET)$(CXX_CMD_ECHO)rm -rf $@;\
|
||||
mkdir -p $(@D);\
|
||||
$(CXX) -c $(CXXFLAGS) $^ -o $@
|
||||
COMPILE.cc.so = $(QUIET)$(CXX_CMD_ECHO)rm -rf $@;\
|
||||
mkdir -p $(@D);\
|
||||
$(CXX) -c $(CXXFLAGS) $(PIC) $^ -o $@
|
||||
COMPILE.c = $(QUIET)$(CC_CMD_ECHO)rm -rf $@;\
|
||||
mkdir -p $(@D);\
|
||||
$(CC) -c $(CFLAGS) $^ -o $@
|
||||
COMPILE.c.so = $(QUIET)$(CC_CMD_ECHO)rm -rf $@;\
|
||||
mkdir -p $(@D);\
|
||||
$(CC) -c $(CFLAGS) $(PIC) $^ -o $@
|
||||
LINK.cc = $(QUIET)$(LINK_CMD_ECHO)rm -rf $@;\
|
||||
mkdir -p $(@D);\
|
||||
$(PROOF) $(CXX) $(CXXFLAGS)
|
||||
LINK.a = $(QUIET)$(AR_CMD_ECHO)rm -rf $@;\
|
||||
mkdir -p $(@D);\
|
||||
$(AR) $(ARFLAGS)
|
||||
LINK.so = $(QUIET)$(SO_CMD_ECHO)rm -rf $@;\
|
||||
mkdir -p $(@D);\
|
||||
$(DLD) $(SOFLAGS)
|
||||
|
||||
|
||||
# ******************************************************************************
|
||||
# * This is the macro to build a shared object/library.... it requires the
|
||||
# * following variables to be defined...
|
||||
# *
|
||||
# * SO_SRCS : Names of the component source files
|
||||
# * SO_LIBS : Names of the dependent libraries
|
||||
# * LIBS : All libraries necessary to compile the dummy application
|
||||
# ******************************************************************************
|
||||
SOBUILD = rm -f $@;\
|
||||
mkdir -p $(@D);\
|
||||
echo "=> Building shared object $(@F)";\
|
||||
echo " => Instanciating templates for $(@F)";\
|
||||
echo "int main() {return 0;}" >dummy.cc;\
|
||||
$(CXX) -c $(CXXFLAGS) $(PIC) dummy.cc $(SO_SRCS) $(LDFLAGS) -ptr./pt$(@F) -ptr./ptrepository $(SO_LIBS);\
|
||||
rm -rf a.out dummy.*;\
|
||||
if test -f ./pt$(@F)/*.o;\
|
||||
then\
|
||||
echo " => Linking $(@F) from objects and template objects";\
|
||||
$(LINK.so) -o $@ $^ ./pt$(@F)/*.o $(LIBS);\
|
||||
else\
|
||||
echo " => Linking $(@F) from objects";\
|
||||
$(LINK.so) -o $@ $^ $(SO_LIBS);\
|
||||
fi;\
|
||||
rm -rf *.o ./pt$(@F)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user