summaryrefslogtreecommitdiff
path: root/TAO/rules.tao.GNU
blob: d718246f0e24ce2d8b35a60f99432ed5f9107891 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
# -*- Makefile -*-

#----------------------------------------------------------------------------
#
#
#
#       Common Makefile rules for all of TAO
#
#----------------------------------------------------------------------------

####
#### Required macros for TAO.
####
TAO_ROOT ?= $(ACE_ROOT)/TAO
TAO_ROOT := $(subst \,/,$(TAO_ROOT))

#This logically belongs in rules.dds.GNU but there are a few projects
#which reference $DDS_ROOT but do not include rules.dds.GNU
ifdef DDS_ROOT
  DDS_ROOT := $(subst \,/,$(DDS_ROOT))
endif

ifeq ($(exceptions),0)
  default:
	echo "ERROR: Emulated exceptions are not safe to use anymore, see the NEWS file"
endif # exceptions

####
#### Macro customization.
####
security ?= 1
ifeq ($(security),1)
  ACE_MAKE_OPTIONS += security
endif # security

ifeq ($(minimum_corba),1)
  ifndef interceptors
    interceptors = 0
  endif  # ! interceptors
  CPPFLAGS += -DTAO_HAS_MINIMUM_CORBA=1
  ACE_MAKE_OPTIONS += minimum_corba
else  # minimum_corba
  override minimum_corba = 0
endif # minimum_corba

ifeq ($(ami),0)
  CPPFLAGS += -DTAO_HAS_AMI=0
else
  override ami = 1
  ACE_MAKE_OPTIONS += ami
  # The following line is not needed,
  # the $TAO_ROOT/tao/orbconf.h file defines it by default
  # CPPFLAGS += -DTAO_HAS_AMI=1
  ifndef ami_callback
    ami_callback = 1
  endif # ! ami_callback
  ifndef ami_poller
    ami_poller = 1
  endif # ! ami_poller
endif # ami

ifeq ($(ami_poller),0)
  CPPFLAGS += -DTAO_HAS_AMI_POLLER=0
else  # ami_poller
  override ami_poller = 1
  # The following line is not needed,
  # the $TAO_ROOT/tao/orbconf.h file defines it by default
  # CPPFLAGS += -DTAO_HAS_AMI_POLLER=1
  ACE_MAKE_OPTIONS += ami_poller
endif # ami_poller

ifeq ($(ami_callback),0)
  CPPFLAGS += -DTAO_HAS_AMI_CALLBACK=0
else  # ami_callback
  override ami_callback = 1
  # The following line is not needed,
  # the $TAO_ROOT/tao/orbconf.h file defines it by default
  # CPPFLAGS += -DTAO_HAS_AMI_CALLBACK=1
  ACE_MAKE_OPTIONS += ami_callback
endif # ami_callback

ifeq ($(corba_messaging),0)
  rt_corba = 0
  CPPFLAGS += -DTAO_HAS_CORBA_MESSAGING=0
else  # corba_messaging
  override corba_messaging = 1
  # The following line is not needed,
  # the $TAO_ROOT/tao/orbconf.h file defines it by default
  # CPPFLAGS += -DTAO_HAS_CORBA_MESSAGING=1
  ACE_MAKE_OPTIONS += corba_messaging
endif # corba_messaging

ifeq ($(rt_corba),0)
  CPPFLAGS += -DTAO_HAS_RT_CORBA=0
else  # rt_corba
  override rt_corba = 1
  # The following line is not needed,
  # the $TAO_ROOT/tao/orbconf.h file defines it by default
  # CPPFLAGS += -DTAO_HAS_RT_CORBA=1
  ACE_MAKE_OPTIONS += rt_corba
endif # rt_corba

ifeq ($(interceptors),0)
  CPPFLAGS += -DTAO_HAS_INTERCEPTORS=0
else  # interceptors
  override interceptors = 1
  # The following line is not needed,
  # the $TAO_ROOT/tao/orbconf.h file defines it by default
  # CPPFLAGS += -DTAO_HAS_INTERCEPTORS=1
  ACE_MAKE_OPTIONS += interceptors
endif # interceptors

# The following is more to document the transport_current,
# the $TAO_ROOT/tao/orbconf.h file defines it by default
# CPPFLAGS += -DTAO_HAS_TRANSPORT_CURRENT=1
transport_current ?= 1

build_tao_idl_be ?= 1

ifeq (1,$(CROSS-COMPILE))
  ACE_MAKE_OPTIONS += cross_compile
else
endif # ! CROSS-COMPILE

# Turn on symbol versioning. The scheme that we follow is to allow
# applications dependent on libraries, with same version numbers (major,
# minor and beta) to run, but applications with dependencies on libraries
# with different minor or major or beta versions to fail.
#
ifeq (cmd,$(findstring cmd,$(SHELL)))
TAO_MAJOR_VERSION := $(shell awk "/TAO_MAJOR_VERSION/ { print $$3}" ${TAO_ROOT}/tao/Version.h)
TAO_MINOR_VERSION := $(shell awk "/TAO_MINOR_VERSION/ { print $$3}" ${TAO_ROOT}/tao/Version.h)
TAO_MICRO_VERSION := $(shell awk "/TAO_MICRO_VERSION/ { print $$3}" ${TAO_ROOT}/tao/Version.h)
TAO_BETA_VERSION := $(shell awk "/TAO_MICRO_VERSION/ { print $$3}" ${TAO_ROOT}/tao/Version.h)
else
TAO_MAJOR_VERSION := $(shell awk '/TAO_MAJOR_VERSION/ { print $$3}' ${TAO_ROOT}/tao/Version.h)
TAO_MINOR_VERSION := $(shell awk '/TAO_MINOR_VERSION/ { print $$3}' ${TAO_ROOT}/tao/Version.h)
TAO_MICRO_VERSION := $(shell awk '/TAO_MICRO_VERSION/ { print $$3}' ${TAO_ROOT}/tao/Version.h)
TAO_BETA_VERSION := $(shell awk '/TAO_MICRO_VERSION/ { print $$3}' ${TAO_ROOT}/tao/Version.h)
endif

GNUACE_PROJECT_VERSION ?= $(TAO_MAJOR_VERSION).$(TAO_MINOR_VERSION).$(TAO_MICRO_VERSION)