File: Make2.Debug

package info (click to toggle)
gnucap 1%3A20230520-dev-1
  • links: PTS, VCS
  • area: main
  • in suites: experimental
  • size: 9,836 kB
  • sloc: cpp: 29,956; sh: 352; makefile: 139
file content (100 lines) | stat: -rw-r--r-- 3,929 bytes parent folder | download
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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
#$Id: Make2.Debug  $ -*- Makefile -*-
# Copyright (C) 2001 Albert Davis
# Author: Albert Davis <aldavis@gnu.org>
#
# 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.
#------------------------------------------------------------------------
VPATH = .:..

# Standard base for g++, debugging, a little optimization
# Running the program will give a spew of line markers for debugging.

CCC = g++
TARGET_EXT = .so

CCFLAGS = \
-fPIC \
-DHAVE_LIBREADLINE \
-std=c++11 -DUNIX  -g -O0 -I. -I../../include -DTRACE_UNTESTED \
-Wall -Wextra \
-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 -Wno-unused-const-variable
#last line not in 4.1

LIBS = \
-lreadline -ltermcap \
-ldl

LDFLAGS = -shared

%.SUFFIXES:
.SUFFIXES: .o .cc
.cc.o:; $(CCC) $(CCFLAGS) -c $<
#------------------------------------------------------------------------
$(TARGET)$(TARGET_EXT): $(TARGET_DEPENDS)
	rm -f $@
	$(CCC) $(CCFLAGS) $(OBJS) $(LIBS) $(LDFLAGS) -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
#------------------------------------------------------------
#------------------------------------------------------------