#$Id: Make2.Debug,v 26.18 2007/03/03 06:08:43 al Exp $ -*- 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 2, 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. #------------------------------------------------------------------------ VPATH = .:.. # Standard base for g++, debugging, a little optimization # Running the program will give a spew of line markers for debugging. CCC = g++ CCFLAGS = \ -DHAVE_LIBREADLINE \ -DUNIX -g -O0 -I. -I.. -DTRACE_UNTESTED \ -Wall -Wextra -Woverloaded-virtual -Wundef -Wpointer-arith -Wcast-qual \ -Wcast-align -Wwrite-strings -Wconversion -Wsign-compare -Winvalid-pch \ -Wdisabled-optimization -Wstack-protector LIBS = \ -lreadline -ltermcap \ LDFLAGS = -rdynamic %.SUFFIXES: .SUFFIXES: .o .cc .cc.o:; $(CCC) $(CCFLAGS) -c $< #------------------------------------------------------------------------ $(TARGET): $(TARGET_DEPENDS) rm -f $@ $(CCC) $(CCFLAGS) $(OBJS) $(LIBS) $(LDFLAGS) -o $@ #------------------------------------------------------------ # warnings turned off, because they warn of nothing wrong #-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 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@ieee.org #------------------------------------------------------------ #------------------------------------------------------------