-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
120 lines (105 loc) · 3.76 KB
/
Makefile
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
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
### Begin DialogBlocks generated body
################################################################################
# Makefile generated by DialogBlocks
#
# Available configurations:
# unicodedebug
# unicoderelease
################################################################################
CONFIG=unicodedebug
# unicodedebug
ifeq ($(CONFIG),unicodedebug)
WXWIN=
TOOLCHAINNAME=gtk2u
WXVERSION:=$(shell echo `wx-config --version`)
CXX=g++
LINKER=g++
CC=gcc
RESCOMP=windres.exe
RCFILEOBJ=DialogBlocks_MSVS2022_wx_demo_rc.o
RCFILESRC=DialogBlocks_MSVS2022_wx_demo.rc
RESOURCEOBJECT=
OUTPUTPATH=GCCUnicodeDebug
OBJECTPATH=GCCUnicodeDebug
BUILDPATHS=$(OBJECTPATH)
EXTRADEPENDENCIES=
PROGRAM=DialogBlocks_MSVS2022_wx_demo
LIBS=$(shell wx-config --libs std --cxxflags)
LINKERFLAGS=
WARNINGFLAGS=-Wall -Wno-write-strings
OPTFLAGS=-O0
DEBUGFLAGS=-ggdb
LIBPATH=
CPPINC:=$(shell wx-config --cxxflags)
GCCFLAGS=
LDFLAGS=$(LIBS) $(LIBPATH) $(LINKERFLAGS)
CPPFLAGS=$(CPPINC) $(GCCFLAGS) $(DEBUGFLAGS) $(OPTFLAGS) $(WARNINGFLAGS)
LIBDIRNAME=$(WXWIN)/GCCBuildDebugGTK2Unicode/lib
RESPATH=--include-dir "$(WXWIN)/include" --include-dir "$(WXWIN)/contrib/include" --include-dir "$(WXWIN)/GCCBuildDebugGTK2Unicode/lib/wx/include/gtk2-unicode-static-3.2"
MACPACKAGEINFO=
# unicoderelease
else
WXWIN=
TOOLCHAINNAME=gtk2u
WXVERSION:=$(shell echo `wx-config --version`)
CXX=g++
LINKER=g++
CC=gcc
RESCOMP=windres.exe
RCFILEOBJ=DialogBlocks_MSVS2022_wx_demo_rc.o
RCFILESRC=DialogBlocks_MSVS2022_wx_demo.rc
RESOURCEOBJECT=
OUTPUTPATH=GCCUnicodeRelease
OBJECTPATH=GCCUnicodeRelease
BUILDPATHS=$(OBJECTPATH)
EXTRADEPENDENCIES=
PROGRAM=DialogBlocks_MSVS2022_wx_demo
LIBS=$(shell wx-config --libs std --cxxflags)
LINKERFLAGS=
WARNINGFLAGS=-Wall -Wno-write-strings
OPTFLAGS=-O2
DEBUGFLAGS=
LIBPATH=
CPPINC:=$(shell wx-config --cxxflags)
GCCFLAGS=
LDFLAGS=$(LIBS) $(LIBPATH) $(LINKERFLAGS)
CPPFLAGS=$(CPPINC) $(GCCFLAGS) $(DEBUGFLAGS) $(OPTFLAGS) $(WARNINGFLAGS)
LIBDIRNAME=$(WXWIN)/GCCBuildReleaseGTK2Unicode/lib
RESPATH=--include-dir "$(WXWIN)/include" --include-dir "$(WXWIN)/contrib/include" --include-dir "$(WXWIN)/GCCBuildReleaseGTK2Unicode/lib/wx/include/gtk2-unicode-static-3.2"
MACPACKAGEINFO=
endif
OBJECTS=$(OBJECTPATH)/dialogblocks_msvs2022_wx_demoapp.o $(OBJECTPATH)/mainform.o $(RESOURCEOBJECT)
all: $(BUILDPATHS) $(MACPACKAGEINFO) $(OUTPUTPATH)/$(PROGRAM)
$(OBJECTPATH):
mkdir -p $(OBJECTPATH)
clean:
rm -f $(OBJECTPATH)/*.o
rm -f $(OBJECTPATH)/*.res
rm -fr .deps .pch
rm -fr $(PROGRAM).app
rm -f $(OUTPUTPATH)/$(PROGRAM)
help:
@echo "Usage: make -f Makefile CONFIG=[unicodedebug|unicoderelease] [all|clean|help]"
$(OUTPUTPATH)/$(PROGRAM): $(OBJECTS) $(EXTRADEPENDENCIES)
$(LINKER) -o $@ $(OBJECTS) $(LDFLAGS)
# Windows only
$(OBJECTPATH)/$(RCFILEOBJ): $(RCFILESRC)
$(RESCOMP) --use-temp-file -i$< -o$@ $(RESPATH) --include-dir . --define NOPCH
# Mac only
$(OUTPUTPATH)/$(PROGRAM).app/Contents/PkgInfo: $(OUTPUTPATH)/$(PROGRAM) $(INFOPLISTSOURCE) $(ICNSSOURCE)
mkdir -p $(OUTPUTPATH)/$(PROGRAM).app/Contents
mkdir -p $(OUTPUTPATH)/$(PROGRAM).app/Contents/MacOS
mkdir -p $(OUTPUTPATH)/$(PROGRAM).app/Contents/Resources
sed -e "s/IDENTIFIER/$(PROGRAM)/" \
-e "s/EXECUTABLE/$(PROGRAM)/" \
-e "s/VERSION/$(WXVERSION)/" \
$(INFOPLISTSOURCE) >$(OUTPUTPATH)/$(PROGRAM).app/Contents/Info.plist
echo -n "APPL????" >$(OUTPUTPATH)/$(PROGRAM).app/Contents/PkgInfo
ln -f $(OUTPUTPATH)/$(PROGRAM) $(OUTPUTPATH)/$(PROGRAM).app/Contents/MacOS/$(PROGRAM)
cp -f $(ICNSSOURCE) $(ICNSDEST)
$(OBJECTPATH)/dialogblocks_msvs2022_wx_demoapp.o: dialogblocks_msvs2022_wx_demoapp.cpp dialogblocks_msvs2022_wx_demoapp.h mainform.h
$(CXX) -c -o $@ $(CPPFLAGS) dialogblocks_msvs2022_wx_demoapp.cpp
$(OBJECTPATH)/mainform.o: mainform.cpp mainform.h tsnsoft.xpm
$(CXX) -c -o $@ $(CPPFLAGS) mainform.cpp
.PHONY: all clean
### End DialogBlocks generated body