1#
2# alpha_osf1_5.0.mk - make variables and rules specific to Tru64 5.0
3#
4
5OSF1 = 1
6AlphaProcessor = 1
7
8
9#
10# Python set-up
11#
12# You must set a path to a Python 1.5.2 interpreter.
13
14#PYTHON = /usr/local/bin/python
15
16
17#
18# Include general unix things
19#
20
21include $(THIS_IMPORT_TREE)/mk/unix.mk
22
23
24#
25# C preprocessor macro definitions for this architecture
26#
27
28IMPORT_CPPFLAGS += -D__alpha__ -D__osf1__ -D__OSVERSION__=5
29
30
31#
32# Standard programs
33#
34
35AR = ar clq
36
37CXX = /usr/bin/cxx
38# For DEC C++ 6.2
39CXXOPTIONS = -ptr $(TOP)/cxx_respository
40#
41DecCxxMajorVersion = 6
42DecCxxMinorVersion = 2
43#
44# For DEC C++ 6.2
45# Uncommment the following line to speed up the compilation, but may require
46# manually deleted some .pch and cxx_respository/TIMESTAMP files to pick
47# up changes in templates or the order of -I flags.
48#
49# CXXOPTIONS += -ttimestamp -pch
50
51CXXMAKEDEPEND += -D__DECCXX -D__DECCXX_VER=60290024 -D__cplusplus
52CXXDEBUGFLAGS = -O
53
54CXXLINK		= $(CXX)
55CXXLINKOPTIONS  = $(CXXDEBUGFLAGS) $(CXXOPTIONS) -call_shared
56
57CC = cc
58CDEBUGFLAGS = -g
59
60CLINK = $(CC) -g
61
62
63#
64# When specifying the "rpath" (directories which the run-time linker should
65# search for shared libraries) we unfortunately need to do it in a single
66# argument.  For this reason we override the default unix CXXExecutable and
67# CExecutable rules.  Any -L flags given in $$libs results in another element
68# being added to the rpath and we then give the whole rpath at the end of the
69# link command line.
70#
71
72RPATH = $(subst $(space),:,$(strip $(IMPORT_LIBRARY_DIRS)))
73
74define CXXExecutable
75(rpath="$(RPATH)"; \
76 for arg in $$libs; do \
77   if expr "$$arg" : "-L" >/dev/null; then \
78     rpath="$$rpath$${rpath+:}`expr $$arg : '-L\(.*\)'"; \
79   fi; \
80 done; \
81 set -x; \
82 $(RM) $@; \
83 $(CXXLINK) -o $@ $(CXXLINKOPTIONS) $(IMPORT_LIBRARY_FLAGS) \
84    $(filter-out $(LibSuffixPattern),$^) $$libs -rpath $$rpath; \
85)
86endef
87
88define CExecutable
89(rpath="$(RPATH)"; \
90 for arg in $$libs; do \
91   if expr "$$arg" : "-L" >/dev/null; then \
92     rpath="$$rpath$${rpath+:}`expr $$arg : '-L\(.*\)'"; \
93   fi; \
94 done; \
95 set -x; \
96 $(RM) $@; \
97 $(CLINK) -o $@ $(CLINKOPTIONS) $(IMPORT_LIBRARY_FLAGS) \
98    $(filter-out $(LibSuffixPattern),$^) $$libs -rpath $$rpath; \
99)
100endef
101
102
103#
104# CORBA stuff
105#
106
107CorbaImplementation = OMNIORB
108
109#
110# OMNI thread stuff
111#
112
113ThreadSystem = Posix
114
115OMNITHREAD_POSIX_CPPFLAGS = -DPthreadDraftVersion=10 -DNoNanoSleep
116OMNITHREAD_CPPFLAGS = -D_REENTRANT -pthread
117
118OMNITHREAD_LIB = $(patsubst %,$(LibSearchPattern),omnithread) \
119		 -lpthread -lexc
120
121lib_depend := $(patsubst %,$(LibPattern),omnithread)
122OMNITHREAD_LIB_DEPEND := $(GENERATE_LIB_DEPEND)
123
124# Default location of the omniORB configuration file [falls back to this if
125# the environment variable OMNIORB_CONFIG is not set] :
126
127OMNIORB_CONFIG_DEFAULT_LOCATION = /etc/omniORB.cfg
128
129# Default directory for the omniNames log files.
130OMNINAMES_LOG_DEFAULT_LOCATION = /var/omninames
131
132#
133# Shared Library support.
134#
135# Platform specific customerisation.
136# everything else is default from unix.mk
137#
138
139ifeq ($(notdir $(CXX)),cxx)
140
141BuildSharedLibrary = 1       # Enable
142
143SHAREDLIB_CPPFLAGS =
144
145define MakeCXXSharedLibrary
146 $(ParseNameSpec); \
147 soname=$(SharedLibrarySoNameTemplate); \
148 set -x; \
149 $(RM) $@; \
150  ld -shared -soname $$soname -set_version $$soname -o $@ \
151 $(IMPORT_LIBRARY_FLAGS) $(filter-out $(LibSuffixPattern),$^) $$extralibs \
152  -lcxxstd -lcxx -lexc -lots -lc;
153endef
154
155ifeq ($(notdir $(CC)),gcc)
156SHAREDLIB_CFLAGS = -fPIC
157endif
158
159endif
160