1
0
mirror of https://github.com/wfjm/w11.git synced 2026-01-15 08:23:06 +00:00
wfjm.w11/tools/make/generic_cpp.mk
Walter F.J. Mueller 093d540121 - The div instruction gave wrong results in some corner cases when either
divisor or quotient were the largest negative integer (100000 or -32768).
  This is corrected now, for details see ECO-026-div.txt
- some minor updates and fixes to support scripts
- xtwi usage and XTWI_PATH setup explained in INSTALL.txt
2014-08-10 14:32:48 +00:00

52 lines
1.1 KiB
Makefile

# $Id: generic_cpp.mk 576 2014-08-02 12:24:28Z mueller $
#
# Revision History:
# Date Rev Version Comment
# 2011-11-28 434 1.0.2 use -fno-strict-aliasing to avoid warings from boost bind
# 2011-11-21 432 1.0.1 gcc 4.4.5 wants explict -fPIC for .so code
# 2011-01-09 354 1.0 Initial version (from wrepo/make/generic_cxx.mk)
#---
#
# Compile options
#
# -- handle C
# -O optimize
# -fPIC position independent code
# -Wall all warnings
#
ifdef CCCOMMAND
CC = $(CCCOMMAND)
endif
ifndef CCOPTFLAGS
CCOPTFLAGS = -O
endif
#
CC = gcc
CFLAGS = -Wall -fPIC $(CCOPTFLAGS) $(INCLFLAGS)
#
# -- handle C++
#
# -O optimize
# -fPIC position independent code
# -Wall all warnings
#
ifdef CXXCOMMAND
CXX = $(CXXCOMMAND)
endif
#
ifndef CXXOPTFLAGS
CXXOPTFLAGS = -O2
endif
#
CXXFLAGS = -Wall -fPIC -fno-strict-aliasing -std=c++0x $(CXXOPTFLAGS) $(INCLFLAGS)
COMPILE.cc = $(CXX) $(CXXFLAGS) $(CPPFLAGS) $(TARGET_ARCH) -c
#
LINK.o = $(CXX) $(CXXOPTFLAGS) $(LDOPTFLAGS) $(LDFLAGS) $(TARGET_ARCH)
LDFLAGS = -g
#
# Compile rule
#
%.o: %.cpp
$(COMPILE.cc) $< $(OUTPUT_OPTION)
#