summaryrefslogtreecommitdiff
path: root/ACE/include/makeinclude/platform_gnuwin32_common.GNU
blob: a217f03b579821d769bdbb717d8cac531ea3a61d (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
# -*- Makefile -*-

ifneq ($(mingw32),1)
  ifneq ($(cygwin32),1)
    fail := \
      $(shell \
          echo "You should not use this file but one of"; \
          echo "platform_mingw32.GNU or platform_cygwin32.GNU"; \
          exit 1)
  endif
endif

# Cygwin/MinGW doesn't allow to add the version number of ACE to the dll name
# because ace.dll.6.0.1 isn't a valid dll name
versioned_so = 0

# Cygwin/MinGW doesn't have rwho
rwho = 0

# Disable auto-import warnings. The Cygwin/MinGW linker has a problem
# with imports
# See https://sourceforge.net/tracker/?func=detail&atid=102435&aid=683455&group_id=2435
# for the details why to do this.
LDFLAGS += -Wl,--enable-auto-import

no_hidden_visibility ?= 1

winsock2 ?= 1
debug ?= 1
optimize ?= 1
threads ?= 1

cpumodelflag ?= 0
tunemodelflag ?= 1

# When building shared libraries
ifeq ($(shared_libs), 1)
  ifneq ($(static_libs_only), 1)
    inline ?= 0
  endif
endif

ifeq ($(debug),0)
  CPPFLAGS += -DNDEBUG
endif

ifeq ($(threads),1)
  FLAGS_C_CC += -mthreads
endif # threads

ifneq ($(CROSS_COMPILE),)
  COMPARCH ?= $(CROSS_COMPILE)
endif

CC      = ${COMPARCH}gcc
CXX     = ${COMPARCH}g++
RC      = ${COMPARCH}windres
DLLTOOL = ${COMPARCH}dlltool
AR      = ${COMPARCH}ar
RANLIB  = ${COMPARCH}ranlib

DCFLAGS    += -g
DCCFLAGS   += -g
DLD        = $(CXX)
LD         = $(CXX)
OCFLAGS    += -O3
OCCFLAGS   += -O3
ARFLAGS    = rsuv
SOEXT      = dll
EXEEXT     = .exe
RC_OUTPUT_FLAG = -o

SOBUILD = $(COMPILE.cc) $(PIC) -o $(VSHDIR)$*.so $<

SHLIBBUILD = $(DLLTOOL) --dllname $@ --output-lib $@.a $(VSHOBJS) && \
  $(SOLINK.cc) -Wl,--enable-auto-image-base -Wl,--out-implib,$@.a \
  -shared -o $@ $(LDFLAGS) $(VSHOBJS) $(ACE_SHLIBS) $(LIBS)

PLATFORM_FL_CPPFLAGS  ?=
PLATFORM_FL_LIBS      ?= -lfltk -lfltk_forms -lfltk_gl -lfltk_images
PLATFORM_FL_LDFLAGS   ?=

PLATFORM_GL_CPPFLAGS  ?= -I/usr/X11R6/include
PLATFORM_GL_LIBS      ?= -lGL
PLATFORM_GL_LDFLAGS   ?= -L/usr/X11R6/lib

PLATFORM_WX_CPPFLAGS  ?= $(shell wx-config --cxxflags) -I/usr/local/include
PLATFORM_WX_LIBS      ?= $(shell wx-config --libs)
PLATFORM_WX_LDFLAGS   ?= $(shell wx-config --ldflags)

# Test for template instantiation, add to SOFLAGS if SONAME set,
# add -E to LDFLAGS if using GNU ld
#
include $(ACE_ROOT)/include/makeinclude/platform_g++_common.GNU

PRELIB = @true