CPPDEBUG=-g -pipe

# Options for compiling, generally.
CPPFLAGS=-DVERSION=\"$(VERSION)\" $(CPPDEBUG)
#         -fmessage-length=0

# C specific warnings
CCOPTS=$(WARNINGS) $(CWARNINGS)
# C++ specific warnings
CXXOPTS=$(WARNINGS) $(CXXWARNINGS)


# Optimization
OPTIM=-Og
#-march=pentiumpro

# Flags.
CFLAGS=$(OPTIM) $(CCOPTS)
CXXFLAGS=$(OPTIM) $(CXXOPTS)
#-fno-rtti

#LDFLAGS=-pg -ax
LDFLAGS=-g

#####
#
CC=gcc
CPP=cpp
CXX=g++ -std=c++17
OPTIM +=  -ftree-vectorize -ffast-math
CPPFLAGS += 
LDFLAGS +=  
WARNINGS +=  -Wall -W -Wundef -Wcast-qual -Wpointer-arith -Wwrite-strings -Wsign-compare -Wredundant-decls -Winit-self -Wextra -Wcast-align -Wformat
# -Wconversion
CWARNINGS +=  -Waggregate-return -Wshadow -Winline -Wstrict-prototypes -Wmissing-prototypes
CXXWARNINGS +=  -Woverloaded-virtual


