summaryrefslogtreecommitdiff
path: root/ACE/include/makeinclude/platform_vxworks7.0.GNU
blob: 7b3dab1c156a3131f6435361cf77a42da1f321c2 (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
# -*- Makefile -*-
# VxWorks 7.0

# Building ACE for VxWorks 7.0
#
# Unlike earlier versions, VxWorks 7 requires a VSB before application code
# can be compiled (either kernel mode or RTP).  See the VxWorks documentation
# for information on creating a VSB (VxWorks Source Build).
#
# Create the file ace/config.h containing #include "ace/config-vxworks.h"
# Create the file include/makeinclude/platform_macro.GNU containing...
# VSB_DIR = <<absolute path to the VSB directory for the target system>>
# HOST_ROOT = <<location of host tools if using tao_idl, etc.>>
# << add other build settings here (debug, optimize, inline, rtp) >>
# include $(ACE_ROOT)/include/makeinclude/platform_vxworks.GNU
#
# Use the wrenv script for your host system to start a VxWorks development shell
# and build ACE from that shell using the normal procedure (set ACE_ROOT,
# generate makefiles if necessary, etc.).
#
# Not all configurations supported on VxWorks 6.x have been brought forward
# to this file.  If you are building a configuration that has not yet been
# attempted on VxWorks 7, this file may need to be changed.  The following have
# been tested:
#   hosts: linux
#   targets: itl_x86
#   toolchains: gnu4.3
#   rtp settings: 1
#   libraries: shared

VXWORKS = 1
CROSS-COMPILE = 1

debug ?= 1
optimize ?= 1
threads ?= 1
rtp ?= 1
pthread ?= $(if $(findstring 1,$(rtp)),1,0)
xerces ?= 0
aio ?= 0
versioned_so ?= 0
footprint ?= 0
rwho = 0
templates ?= automatic

ifeq (,$(WIND_BASE))
  default:
  @ERROR: you must set your WIND_BASE environment variable
endif # WIND_BASE

ifeq (,$(WIND_HOST_TYPE))
  default:
  @ERROR: you must set your WIND_HOST_TYPE environment variable
endif # WIND_HOST_TYPE

ifeq ($(WIND_HOST_TYPE),x86-win32)
  vxworks_ntbuild ?= 0
  mingw32 ?= 1
  lacks_touch ?= 0
  PWD = $(subst \,/,$(shell pwd))
  ACE_ROOT := $(subst \,/,$(ACE_ROOT))
  TAO_ROOT := $(subst \,/,$(TAO_ROOT))
  CIAO_ROOT := $(subst \,/,$(CIAO_ROOT))
  HOST_ROOT := $(subst \,/,$(HOST_ROOT))
  override RM = rm -f
  HOST_EXE_EXT = .exe
endif # x86-win32

ifneq (,$(HOST_ROOT))
  TAO_IDLFLAGS += -g $(HOST_ROOT)/bin/ace_gperf
  TAO_IDL = $(HOST_ROOT)/bin/tao_idl$(HOST_EXE_EXT)
  TAO_IDL3_TO_IDL2 = $(HOST_ROOT)/bin/tao_idl3_to_idl2$(HOST_EXE_EXT)
  TAO_IDL_DEP = $(TAO_IDL)
  TAO_IDL3_TO_IDL2_DEP = $(TAO_IDL3_TO_IDL2)
else
  # Append the HOST_EXE_EXT if it's not already there
  TAO_IDL_DEP = $(TAO_IDL:$(HOST_EXE_EXT)=)$(HOST_EXE_EXT)
  TAO_IDL3_TO_IDL2_DEP = $(TAO_IDL3_TO_IDL2:$(HOST_EXE_EXT)=)$(HOST_EXE_EXT)
endif

VXWORKS_VERSION_FLAG ?= -DACE_VXWORKS=0x700
CPPFLAGS += $(VXWORKS_VERSION_FLAG)

ifeq ($(pthread),1)
  CPPFLAGS += -DACE_HAS_PTHREADS
endif

ace_vx_mk_dir = $(if $(findstring 1,$(rtp)),$(WIND_USR_MK),$(WIND_KRNL_MK))
include $(ace_vx_mk_dir)/defs.library.mk

CCFLAGS += $(C++FLAGS)
PIC += $(OPTION_SHARED_CODE)

OCFLAGS += $(filter -O%,$(CFLAGS))
OCCFLAGS += $(filter -O%,$(CCFLAGS))
ifneq ($(OCFLAGS),)
  CFLAGS := $(filter-out $(OCFLAGS),$(CFLAGS))
endif
ifneq ($(OCCFLAGS),)
  CCFLAGS := $(filter-out $(OCCFLAGS),$(CCFLAGS))
endif

DCFLAGS += -g
DCCFLAGS += -g

LD = $(CPLUS)
DLD = $(CPLUS)

EXEEXT = $(if $(findstring 1,$(rtp)),.vxe,.out)

SO_NAME = $(SHLIB)
SOFLAGS += $(C++_COMPILER) $(OPTION_SHARED_CODE) $(LD_SHARED_LIB) \
           $(LD_OPTION_SONAME)

LDFLAGS := $(filter-out -X -N,$(LDFLAGS))
LDFLAGS += -L$(VSB_DIR)/usr/lib/common$(if $(filter library,$(PRJ_TYPE)),/PIC)
LIBS += -lstdc++

LDFLAGS += $(if $(filter 1,$(shared_libs)),$(if $(filter 1,$(static_libs_only)),,$(LD_OPTION_DYNAMIC)))