#$Id: Make2.Debug $ -*- Makefile -*- # Copyright (C) 2001 Albert Davis # Author: Albert Davis # # This file is part of "Gnucap", the Gnu Circuit Analysis Package # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3, or (at your option) # any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA # 02110-1301, USA. #------------------------------------------------------------------------ # Standard base for g++, debugging, no optimization # Running the program will give a spew of line markers for debugging. #------------------------------------------------------------------------ PREFIX = /usr/local #------------------------------------------------------------------------ # comment out to build witout readline support HAVE_LIBREADLINE = -DHAVE_LIBREADLINE LIBREADLINE = -lreadline #------------------------------------------------------------------------ CXX = g++ -fno-diagnostics-color CCFLAGS = \ -fPIC \ -std=c++14 -g -O0 \ -Wall -Wextra \ -Wsuggest-override \ -Wswitch-enum -Wundef -Wpointer-arith -Woverloaded-virtual \ -Wcast-qual -Wcast-align -Wpacked -Wshadow -Wconversion \ -Winit-self -Wmissing-include-dirs -Winvalid-pch \ -Wvolatile-register-var -Wstack-protector \ -Wvla -Woverlength-strings -Wno-sign-conversion #last line not in 4.1 MAKE_CPPFLAGS = -DUNIX ${INCLUDE} -DTRACE_UNTESTED ${CPPFLAGS} ${LIST_CPPFLAGS} MAKE_CXXFLAGS = ${CCFLAGS} ${CXXFLAGS} ${LIST_CXXFLAGS} .SUFFIXES: .SUFFIXES: .so .o .cc .cc.o:; $(CXX) $(MAKE_CXXFLAGS) ${MAKE_CPPFLAGS} -c $< # MakeConf.Debug .cc.so:; $(MAKE_LIB) $< #------------------------------------------------------------------------ MAKE_EXE = $(CXX) $(CCFLAGS) $(CXXFLAGS) $(OBJS) $(LIBS) $(LDFLAGS) -o $@ MAKE_LIB = $(CXX) $(MAKE_CXXFLAGS) $(MAKE_CPPFLAGS) $(OBJS) $(LIBS) $(LDFLAGS) -shared -o $@ #------------------------------------------------------------ # warnings turned off, because they warn of nothing wrong # 4.3 #-Wswitch-default -- lack of default is correct with enum #-Wfloat-equal -- warns on NA, div by zero trap #-Wpadded -- a bool in a class is enough #-Wredundant-decls -- in both header and func is an error check #-Wmissing-declarations -- pascal style #-Wmissing-noreturn -- warns when always throws exception #-Wunreachable-code -- warns even if reachable .. compiler bug?? #-Waggregate-return -- warns even if passed by reference #-Wunsafe-loop-optimizations -- if can't unroll a loop #-Winline #-Wdisabled-optimization -- -O0 disables optimization, so it warns # 4.2 #-Wpadded -- a bool in a class is enough #-Winline #-Waggregate-return -- warns even if passed by reference #-Wfloat-equal -- warns on NA, div by zero trap #-Wredundant-decls -- in both header and func is an error check #-Wunsafe-loop-optimizations -- warns on any loop with variable count # warnings turned off, because of the public headers #-Wunreachable-code -- didn't use nonportable syntax to hide #-Wmissing-noreturn -- didn't use nonportable syntax to hide # warnings turned off, issues with clang #-Wlogical-op -- not recognized #-Wsign-conversion -- int to size_t #-Wunused-const-variable -- generated code # warnings that should be on, but ... #-Wshadow -- lambda functions #------------------------------------------------------------ # If you are porting and using g++, you should use this file as a start, # for a "debug" version, with extra warnings and run-time tracing. # If you get errors or warnings, make a copy of it and modify that. # After it works, use the file "Make2.g++" as a start for # executable to use. # If the port is non-trivial, check with me first because someone else # may have already done it. # If it works without changes, send me a note so I can put it in the docs. # Please send the changes to aldavis@gnu.org #------------------------------------------------------------ #------------------------------------------------------------

AltStyle によって変換されたページ (->オリジナル) /