summaryrefslogtreecommitdiff
path: root/include/makeinclude/platform_linux_kcc.GNU
blob: 8a46f81611b941dc9e4a8cd65ebffccf3b41dc82 (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
# $Id$

# According to Ben Eng <ben@jetpen.com>, this file
# should allow ACE to be built on Linux using KAI C++ 3.3a.
#
# NOTE:  evaluation copies of KCC might include libraries that
# were compiled with exception handling enabled.  To enable link
# compatibility with those libraries, you must build ACE with
# exception handling enabled, as well.  To do that, either set
# the exceptions macro below to 1, or build with:
# make exceptions=1

ifeq (,$(debug))
  debug=0
endif
ifeq (,$(optimize))
  optimize=1
endif
ifeq (,$(threads))
  threads = 1
endif

CC      = KCC
CXX     = $(CC)
CFLAGS  += -D_POSIX_THREADS -D_POSIX_THREAD_SAFE_FUNCTIONS -D_REENTRANT \
           -D_GNU_SOURCE

CCFLAGS += $(CFLAGS) -DNULL=0
DCFLAGS += +K0 -g
OCFLAGS += +K3 -O --one_instantiation_per_object
DLD     = $(CC)
LD      = $(CC)
# Using just -ldl results in a very annoying warning (nm: no symbols),
# because the prelinker searches for missing templates in the libdl
# library.  Passing the option directly to the linker fixes the
# warning.
LIBS    += -Wl,-ldl
MATHLIB = -lm

ifeq (,$(exceptions))
  exceptions=0
endif # exceptions

ifeq ($(exceptions),0)
  CCFLAGS += --no_exceptions
endif # ! exceptions

ifeq ($(threads),1)
  CFLAGS += --thread_safe
  LDFLAGS += --thread_safe
endif # threads

# KCC allows suppresion of warnings and errors.
# Warning #280 declaration of a member with the same name as its class
CCFLAGS += --diag_suppress 280

ifdef static_libs_only
  ifneq ($(static_libs_only),0)
    static_libs=1
  endif
endif
ifneq ($(static_libs),0)
  CCFLAGS   += --one_instantiation_per_object
endif

PIC     = -fPIC
AR      = $(CC)
ARFLAGS = $(CCFLAGS) $(CPPFLAGS) -Bstatic -o
RANLIB  = @true
SOFLAGS = $(PIC) $(CCFLAGS) $(CPPFLAGS)
SOBUILD = $(COMPILE.cc) $(SOFLAGS) -o $(VSHDIR)$*.o $<
PRELIB  = @true
PRELIB_USES_OBJ_ONLY = 1