-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathamext-cxx.mk
More file actions
46 lines (36 loc) · 952 Bytes
/
amext-cxx.mk
File metadata and controls
46 lines (36 loc) · 952 Bytes
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
#
# Support for C++ language
#
# - extensions: .cc, .cpp, cxx
# - CXX, CXXFLAGS
# - AM_CXXFLAGS, <tgt>_CXXFLAGS
#
# autoconfigurable values
ifneq ($(filter-out @%,@CXX@),)
CXX = @CXX@
CXXFLAGS = @CXXFLAGS@
endif
CXX ?= c++
CXXFLAGS ?= -O -g
# fixme: add warning flags to CXXFLAGS
CXXFLAGS += $(WFLAGS)
# helper variables
CXXLD ?= $(CXX)
CXXCOMPILE ?= $(CXX) $(AM_DEFS) $(DEFS) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
CXXLINK ?= $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
# full compile command
define AM_LANG_CXX_COMPILE
$(E) "CXX" $<
$(Q) $(LTCOMPILE) $(CXXCOMPILE) $(OBJDEPS) -c -o $@ $<
endef
# full link command
define AM_LANG_CXX_LINK
$(E) "CXXLD" $@
$(Q) $(LTLINK) $(CXXLINK) $^ $(AM_LIBS) $(LIBS) $(AM_LT_RPATH)
endef
# source file extensions for c++
AM_LANG_CXX_SRCEXTS = .cc .cpp cxx
# register per-target variable
AM_TARGET_VARIABLES += CXXFLAGS
# register new language
AM_LANGUAGES += CXX