| 1 |
# -*- Makefile -*- |
| 2 |
|
| 3 |
include $(ACE_ROOT)/include/makeinclude/platform_linux_common.GNU |
| 4 |
|
| 5 |
ifeq ($(insure),0) |
| 6 |
CC ?= gcc |
| 7 |
CXX ?= g++ |
| 8 |
CXX_FOR_VERSION_TEST ?= $(CXX) |
| 9 |
else |
| 10 |
CXX_FOR_VERSION_TEST ?= g++ |
| 11 |
endif |
| 12 |
|
| 13 |
ifndef CXX_FULL_VERSION |
| 14 |
CXX_FULL_VERSION := $(shell $(CXX_FOR_VERSION_TEST) --version) |
| 15 |
endif |
| 16 |
ifndef CXX_VERSION |
| 17 |
CXX_VERSION := $(shell $(CXX_FOR_VERSION_TEST) -dumpversion) |
| 18 |
endif |
| 19 |
|
| 20 |
ifeq ($(buildbits),32) |
| 21 |
FLAGS_C_CC += -m32 |
| 22 |
LDFLAGS += -m32 |
| 23 |
endif |
| 24 |
ifeq ($(buildbits),64) |
| 25 |
FLAGS_C_CC += -m64 |
| 26 |
LDFLAGS += -m64 |
| 27 |
endif |
| 28 |
|
| 29 |
ifeq ($(dynamic_loader),0) |
| 30 |
CPPFLAGS += -DACE_HAS_DYNAMIC_LINKING=0 |
| 31 |
else |
| 32 |
LIBS += -ldl |
| 33 |
endif |
| 34 |
|
| 35 |
ifeq ($(threads),1) |
| 36 |
FLAGS_C_CC += -pthread |
| 37 |
SOFLAGS += -pthread |
| 38 |
LIBS += -lrt |
| 39 |
endif |
| 40 |
|
| 41 |
ifeq ($(static_stdlibs),1) |
| 42 |
LDFLAGS += -static-libgcc -static-libstdc++ |
| 43 |
endif |
| 44 |
|
| 45 |
# Test for template instantiation, add to SOFLAGS if SONAME set, |
| 46 |
# add -E to LDFLAGS if using GNU ld |
| 47 |
# |
| 48 |
include $(ACE_ROOT)/include/makeinclude/platform_g++_common.GNU |
| 49 |
|
| 50 |
OCFLAGS ?= -O3 |
| 51 |
OCCFLAGS ?= -O3 |
| 52 |
|
| 53 |
#### GNU gas has a string limit of 4096 characters. On Alphas, |
| 54 |
#### builds will fail due to running over that limit. There are |
| 55 |
#### at least two workarounds: |
| 56 |
#### 1) Change the limit to 8192 characters and rebuild gas. See |
| 57 |
#### ACE-INSTALL.html for more information. |
| 58 |
#### 2) Don't use -g when compiling those files. |
| 59 |
#### If you're building on an Alpha and you haven't hacked and |
| 60 |
#### rebuilt gas, you might need to uncomment the following. |
| 61 |
#### ifeq ($(debug),1) |
| 62 |
#### SUPPRESS_DASH_G = 1 |
| 63 |
#### endif # debug |