Merge pull request #4655 from iguessthislldo/igtd/rtps-ports
[OpenDDS.git] / rules.dds.GNU
blob777803d3124747ec29bcd50d4d51f8dc20bf9660
1 # -*- Makefile -*-
3 #----------------------------------------------------------------------------
6 #       Common Makefile rules for all of DDS
8 #----------------------------------------------------------------------------
10 # This is a multiple-include guard for this file because older versions of
11 # ACE's gnuace template will do an automatic include of this file as well
12 # as the one that will be generated by the verbatim in dcps.mpb.
13 ifndef rules_dds_gnu_included
14 rules_dds_gnu_included=1
17 ifndef TAO_ROOT
18   TAO_ROOT = $(ACE_ROOT)/TAO
19 endif
21 ifndef DDS_ROOT
22   DDS_ROOT = $(TAO_ROOT)/DDS
23 endif
24 DDS_ROOT := $(subst \,/,$(DDS_ROOT))
26 ifeq (,$(findstring -L$(DDS_ROOT)/lib,$(LDFLAGS)))
27   LDFLAGS += -L$(DDS_ROOT)/lib
28 endif
29 ifeq (,$(findstring -I$(DDS_ROOT),$(INCLDIRS)))
30   INCLDIRS += -I$(DDS_ROOT)
31 endif
33 # Set defaults for gnumake macros corresponding to MPC features used by DDS
34 # This is needed for features used in requires/avoids statements in .mpc files
35 built_in_topics ?= 1
36 tao_orbsvcs ?= 1
37 query_condition ?= 1
38 content_filtered_topic ?= 1
39 multi_topic ?= 1
40 ownership_profile ?= 1
41 ownership_kind_exclusive ?= 1
42 object_model_profile ?= 1
43 persistence_profile ?= 1
44 exceptions ?= 1
45 no_opendds_safety_profile ?= 1
46 no_opendds_security ?= 1
48 OPENDDS_IDL = $(DDS_ROOT)/bin/opendds_idl
49 OPENDDS_IDL_DEP = $(OPENDDS_IDL)
50 IDL2JNI = $(DDS_ROOT)/bin/idl2jni
51 IDL2JNI_DEP = $(IDL2JNI)
53 # Turn on symbol versioning. The scheme that we follow is to allow
54 # applications dependent on libraries, with same version numbers (major,
55 # minor and beta) to run, but applications with dependencies on libraries
56 # with different minor or major or beta versions to fail.
58 ifeq (cmd,$(findstring cmd,$(SHELL)))
59   OPENDDS_VERSION := \
60     $(shell awk "/define OPENDDS_VERSION / { print substr($$3, 2, length($$3) - 2) }" ${DDS_ROOT}/dds/Version.h)
61 else
62   OPENDDS_VERSION := \
63     $(shell awk '/define OPENDDS_VERSION / { print substr($$3, 2, length($$3) - 2) }' ${DDS_ROOT}/dds/Version.h)
64 endif
65 GNUACE_PROJECT_VERSION ?= $(OPENDDS_VERSION)
67 -include $(DDS_ROOT)/user_macros.GNU
69 # user_macros.GNU may not exist, but GNU make will try to "make" it using the
70 # overly general rule for creating symlinks in rules.local.GNU.  To prevent
71 # this, create a more specific rule for user_macros.GNU that does nothing.
72 .DEFAULT_GOAL := all
73 $(DDS_ROOT)/user_macros.GNU: ;
75 endif # rules_dds_gnu_included