blob: 531491829bd3c61fd69ea3d2b93f14fc91d34c51 (
plain)
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
|
--- a/src/Makefile.old 2024-06-21 11:25:45.990728109 +0200
+++ b/src/Makefile 2024-06-21 11:33:20.289571247 +0200
@@ -46,8 +46,8 @@
#***************************************************************************************************
# Which compiler and linker (eg. g++ or clang++)
-CXX = g++
-LD = g++
+CXX ?= g++
+LD ?= g++
ifneq ($(GSPICEUI_MSWIN),0)
LD += -static-libstdc++ -static-libgcc
WINDRES = windres
@@ -108,17 +108,7 @@
# -fabi-version=N Use version N of the C++ ABI (this choice must match the wxWidgets library)
CXXFLAGS := -std=c++17 -fabi-version=14
-ifeq ($(GSPICEUI_DEBUG),0)
- # Options for release (not using -Wall since it's GCC specific)
- CXXFLAGS += -O3
-else
- # Options for development
- CXXFLAGS += -g3 -O0 -Wall -Wextra -Wpedantic
-
- # The following warning has been disabled because I don't know how to fix it
- CXXFLAGS += -Wno-overloaded-virtual
-endif
-CXXFLAGS += -pipe $(shell $(WXCFG) --cxxflags)
+CXXFLAGS += $(shell $(WXCFG) --cxxflags)
# I like to compile using the option "-Wall" etc. however tests that break wxWidgets are turned off
ifneq ($(GSPICEUI_DEBUG),0)
@@ -231,7 +221,7 @@
# -o specify the output file name
$(BINDIR)/$(PROG) : $(OBJS)
- $(LD) -pipe -o $(BINDIR)/$(PROG) obj/*.o $(LIBS)
+ $(CXX) -o $(BINDIR)/$(PROG) obj/*.o $(LDFLAGS) $(LIBS)
ifeq ($(ROOT)/GSpiceUI.app,$(wildcard $(ROOT)/GSpiceUI.app))
cp $(BINDIR)/$(PROG) $(ROOT)/GSpiceUI.app/Contents/MacOS/gspiceui
endif
@@ -296,7 +286,7 @@
# Compiler options
-test_% : CXXFLAGS = -Wall -g -pipe $(shell $(WXCFG) --cxxflags)
+test_% : CXXFLAGS += $(shell $(WXCFG) --cxxflags)
test_% : CXXFLAGS += -D $(shell echo $@ | tr "[:lower:]" "[:upper:]")
# Libraries
test_% : LIBS = $(shell $(WXCFG) --libs core,base)
|