Merge pull request #2216 from jwillemsen/jwi-cxxversionchecks
[ACE_TAO.git] / ACE / include / makeinclude / platform_lynxos.GNU
blob21f70b32e17550910c8a007c7a6ed9a62f0116dd
1 # -*- Makefile -*-
3 # LynxOS with g++.  Defaults to LynxOS Version 4.0.0.  For Version 4.2.0,
4 # for example, add "VERSION=4.2.0" to your make invocation.
6 ifeq ($(static_libs_only),1)
7   shared_libs = 0
8 endif
10 ifeq ($(shell uname -s),LynxOS)
11   export VERSION=$(shell uname -r)
13   # LynxOS's mkdir needs -f option to prevent it returning error
14   # if directory already exists.
15   ACE_MKDIR=mkdir -pf
16 else
17   CROSS-COMPILE = 1
19   ifeq (,$(VERSION))
20 #    export VERSION = 4.0.0
21     export VERSION = 2.3.0
22   endif # VERSION
23 endif # ! LynxOS
25 LYNXOS_MAJOR = $(shell echo $(VERSION) | awk -F. '{print $$1;}')
26 LYNXOS_MINOR = $(shell echo $(VERSION) | awk -F. '{print $$2;}')
28 optimize ?= 1
29 debug ?= 1
30 threads ?= 1
32 ifeq ($(threads),1)
33   FLAGS_C_CC += -mthreads
34   LDFLAGS += -mthreads -L/usr/lib/thread
35 endif
37 ifeq ($(rpc),1)
38   LIBS    += -lrpc
39 endif
41 ifeq ($(shared_libs),1)
42   CPPFLAGS   += -DACE_HAS_SVR4_DYNAMIC_LINKING
43   FLAGS_C_CC += -mshared
44   LDFLAGS    += -mshared
45   LIBS       += -ldl
46   ifeq ($(CROSS-COMPILE),1)
47     LDFLAGS  += -Wl,-rpath-link,$(ACE_ROOT)/lib
48   endif
49 else
50   LIBS     += -lnetinet
51 endif
53 CC              = gcc
54 CXX             = g++
56 AR              = ar
57 ARFLAGS         = ruv
58 CPPFLAGS        += -DACE_LYNXOS_MAJOR=$(LYNXOS_MAJOR) -DACE_LYNXOS_MINOR=$(LYNXOS_MINOR)
59 DCFLAGS         += -g
60 DCCFLAGS        += $(DCFLAGS)
61 DLD             = $(CXX)
62 LD              = $(CXX)
63 LIBS            += -lbsd
64 OCFLAGS         += -O2
65 OCCFLAGS        = $(OCFLAGS)
66 PIC             = -fPIC
67 PRELIB          = @true
68 RANLIB          = @true
69 SOFLAGS         += -shared
71 PLATFORM_XT_CPPFLAGS=
72 PLATFORM_XT_LIBS=-lXm -lXt
73 PLATFORM_XT_LDFLAGS=
75 PLATFORM_X11_CPPFLAGS=
76 PLATFORM_X11_LIBS=-lXp -lXpm -lXmu -lXext -lX11 -lSM -lICE
77 PLATFORM_X11_LDFLAGS=
79 PLATFORM_TCL_CPPFLAGS=$(shell . /usr/lib/tclConfig.sh && echo -n $$TCL_INC_DIR $$TCL_DEFS)
80 PLATFORM_TCL_LIBS=-ltcl8.0
81 PLATFORM_TCL_LDFLAGS=
83 PLATFORM_TK_CPPFLAGS=$(shell . /usr/lib/tkConfig.sh && echo -n $$TK_INC_DIR $$TK_DEFS) $(PLATFORM_X11_CPPFLAGS)
84 PLATFORM_TK_LIBS=-ltk8.0 $(PLATFORM_XT_LIBS) $(PLATFORM_X11_LIBS)
85 PLATFORM_TK_LDFLAGS=$(PLATFORM_X11_LDFLAGS)
87 # Test for template instantiation, add to SOFLAGS if SONAME set,
88 # add -E to LDFLAGS if using GNU ld
90 include $(ACE_ROOT)/include/makeinclude/platform_g++_common.GNU
92 CCFLAGS += -fpermissive -fno-strict-aliasing
94 # To save much disk space, strip all executables.  Comment the
95 # following line out if you want to debug.  Or, add "POSTLINK="
96 # to your make invocation.
97 ifeq ($(static_libs),1)
98   POSTLINK       = ; strip $@
99 endif