# arch_spec_ace.mk # # Architecture/site specific makefile fragment # for inclusion by packages that use ACE (the communications package). # # This should be included _after_ standard.mk. # # Created by Gordon Watts # # This file assumes that ACE_DIR points to the standard ACE distribution # directory. This means that "ACE_DIR/ace" contains all the .h files you need. # Also, ACE_DIR/ace contains the libraries with which one must link. # # Include paths will be setup so you you can do the following: # #include "ace/Synch.h" # following the pattern of SRT. # ifndef ACE_ROOT ERROR := $(shell echo "***" >& 2 ) ERROR := $(shell echo "*** ACE has not been setup... ACE_ROOT is not defined" >& 2 ) ERROR := $(shell echo "***" >& 2 ) else override CPPFLAGS += -I$(ACE_ROOT) override LDFLAGS += -L$(ACE_ROOT)/ace ifneq (,$(findstring NT4,$(BFARCH))) override LOADLIBES += aced.lib else override LOADLIBES += -lACE endif ifneq (,$(findstring OSF,$(BFARCH))) override LOADLIBES += -lpthread ifneq (,$(findstring KCC,$(BFARCH))) # warning: nested comment is not allowed # (one of dec's headers has a nested comment...) override CXXFLAGS += --diag_suppress 9 endif # Needed on V4.0b in order to get __sigwaitd10 declared. override CPPFLAGS += -D_REENTRANT # On OSF, ace refers to a symbol `__sigwaitd10'. # In V4.0b, this is declared, provided that _REENTRANT is defined. # But in V4.0, the declaration has gone away. # This should really be fixed in the ace sources, but i don't # want to rebuild them now. So do this hack instead: rename # __sigwaitd10 to _Psigwait (which is declared in V4.0d). ifeq ($(shell uname -rv),V4.0 564) # V4.0b -- don't do anything here. else override CPPFLAGS += -D__sigwaitd10=_Psigwait endif endif # ACE does not build with --strict on for IRIX due to a funny type called # long long that the OS uses. Bummer. ifneq (,$(findstring IRIX,$(BFARCH))) override CPPFLAGS += -D_SGI_SOURCE NOSTRICT:=yes endif # Same deal on Linux. ifneq (,$(findstring Linux,$(BFARCH))) override LOADLIBES += -lpthread override CPPFLAGS += -D_GNU_SOURCE NOSTRICT := yes endif endif # # Optionally, turn off strict mode. # ifdef NOSTRICT override CXXFLAGS := $(filter-out --strict,$(CXXFLAGS)) override CPPFLAGS := $(filter-out -D__KAI_STRICT,$(CPPFLAGS)) override CPPFLAGS := $(filter-out -D__STRICT_ANSI__,$(CPPFLAGS)) endif