]>
Commit | Line | Data |
---|---|---|
d7463f75 JS |
1 | # |
2 | # File: Makefile for wxconfigtool | |
3 | # Author: Julian Smart | |
4 | # Created: 2002.05.12 | |
5 | # Updated: | |
6 | # Copyright: (c) Julian Smart | |
7 | # | |
8 | # To make absolutely everything: | |
9 | # | |
10 | # % mkdir /tmp/wxconfigtool-build | |
11 | # % cd /tmp/wxconfigtool-build | |
12 | # % make -f $(APPDIR)/src/Makefile WXDIR=$(WXDIR) WXBUILDDIR=$(WXBUILDDIR) APPDIR=$(APPDIR) LEVEL=debug full | |
13 | # | |
14 | # To make just ConfigTool: | |
15 | # | |
16 | # % make ... LEVEL=debug wxconfigtool | |
17 | # | |
18 | # To make wxWindows library: | |
19 | # | |
20 | # % make ... LEVEL=debug wx | |
21 | # | |
22 | # The result will be subdirectories under your /tmp/wxconfigtool-build (or other specified | |
23 | # directory) containing: | |
24 | # | |
25 | # wxconfigtool-build-debug/ | |
26 | # wxwin-build-debug/ | |
27 | # | |
28 | # To make a release version, specify LEVEL=release instead of LEVEL=debug. | |
29 | # | |
30 | ||
31 | # Current (build) directory | |
32 | CURRDIR = $(shell pwd) | |
33 | BUILDDIR=$(CURRDIR) | |
34 | ||
35 | top_srcdir = $(WXDIR) | |
36 | top_builddir = $(WXBUILDDIR) | |
37 | program_dir = | |
38 | ||
39 | # If we don't specify a location for wxWindows to be | |
40 | # built, use a default. | |
41 | ifeq "$(top_builddir)" "" | |
42 | topbuilddir = $(CURRDIR)/wxwin-build-$(LEVEL) | |
43 | WXBUILDDIR=$(top_builddir) | |
44 | endif | |
45 | ||
46 | # ConfigTool build directory | |
47 | APPBUILDDIR=$(BUILDDIR)/wxconfigtool-build-$(LEVEL) | |
48 | ||
49 | # StartingBlocks source hierarchy | |
50 | # You have to specify this when invoking make. | |
51 | APPDIR=You_should_override_the_APPDIR_variable | |
52 | ||
53 | # ConfigTool source directory | |
54 | APPSRCDIR=$(APPDIR)/src | |
55 | ||
56 | # ConfigTool include directory | |
57 | APPINCDIR=$(APPDIR)/src | |
58 | ||
59 | # Extra includes | |
60 | APPEXTRADEFS= \ | |
61 | -I$(WXDIR)/contrib/include \ | |
62 | -I$(APPSRCDIR) \ | |
63 | ||
64 | # -I$(UTILSDIR) \ | |
65 | ||
66 | WXVERSION=2.4 | |
67 | ||
68 | # Use the small C++ support library | |
69 | APPEXTRALIBS=-lsupc++ ${top_builddir}/lib/libwx_$(WXTOOLKIT)$(WXDEBUGSUFFIX)_xrc-$(WXVERSION).a | |
70 | ||
71 | PLATFORM_OS=$(shell echo $(OS)) | |
72 | ||
73 | ifeq "$(PLATFORM_OS)" "Windows_NT" | |
74 | ARCHITECTURE="i686" | |
75 | WXTOOLKIT=msw | |
76 | else | |
77 | ARCHITECTURE=$(shell arch) | |
78 | ifeq "$(ARCHITECTURE)" "i686" | |
79 | WXTOOLKIT=gtk | |
80 | else | |
81 | WXTOOLKIT=mac | |
82 | endif | |
83 | endif | |
84 | ||
85 | #printit: | |
86 | # @echo $(PLATFORM_OS) | |
87 | ||
88 | ifeq "$(LEVEL)" "debug" | |
89 | WXDEBUGSUFFIX=d | |
90 | else | |
91 | WXDEBUGSUFFIX= | |
92 | endif | |
93 | ||
94 | ||
95 | # Where to find the wx-config file | |
96 | WXCONFIG=$(WXBUILDDIR)/wx-config $(WXCONFIGFLAGS) | |
97 | ||
98 | ifeq "$(LEVEL)" "debug" | |
99 | WXDEBUGFLAGS=--enable-debug --enable-debug_gdb --enable-debug_cntxt | |
100 | endif | |
101 | ||
102 | PROGRAM=$(APPBUILDDIR)/wxconfigtool | |
103 | ||
104 | OBJECTS = \ | |
105 | $(APPBUILDDIR)/appsettings.o \ | |
106 | $(APPBUILDDIR)/configitem.o \ | |
107 | $(APPBUILDDIR)/configitemselector.o \ | |
108 | $(APPBUILDDIR)/configtooldoc.o \ | |
109 | $(APPBUILDDIR)/configtoolview.o \ | |
110 | $(APPBUILDDIR)/configtree.o \ | |
111 | $(APPBUILDDIR)/custompropertydialog.o \ | |
112 | $(APPBUILDDIR)/htmlparser.o \ | |
113 | $(APPBUILDDIR)/mainframe.o \ | |
114 | $(APPBUILDDIR)/propeditor.o \ | |
115 | $(APPBUILDDIR)/property.o \ | |
116 | $(APPBUILDDIR)/settingsdialog.o \ | |
117 | $(APPBUILDDIR)/utils.o \ | |
118 | $(APPBUILDDIR)/wxconfigtool.o | |
119 | ||
120 | DEPFILES=$(PROGRAM).d | |
121 | ||
122 | ifeq "$(USEDUMMYMAKEPROG)" "1" | |
123 | include $(APPSRCDIR)/makeprog.env | |
124 | else | |
125 | include $(top_builddir)/src/makeprog.env | |
126 | endif | |
127 | ||
128 | CC=gcc | |
129 | CXX=gcc | |
130 | ||
131 | mkbuilddir: | |
132 | mkdir -p $(APPBUILDDIR) | |
133 | ||
134 | full: wx all | |
135 | ||
136 | # --with-libpng=builtin --with-zlib=builtin --with-libjpeg=builtin | |
137 | wx: | |
138 | @mkdir -p $(WXBUILDDIR) ; \ | |
139 | cd $(WXBUILDDIR) ; \ | |
140 | if test ! -f Makefile ; then rm -f *.o *.d ; \ | |
141 | rm -f *.cache ; \ | |
142 | $(WXDIR)/configure --disable-shared --enable-gui --enable-log $(WXDEBUGFLAGS) --with-threads --disable-no_rtti --without-sockets --without-odbc --with-libjpeg --with-libpng=builtin --with-zlib=builtin --enable-wave ; \ | |
143 | fi; \ | |
144 | make; cd contrib/src/xrc; make | |
145 | ||
146 | cleanapp: clean | |
147 | ||
148 | cleanwx: | |
149 | rm -f -r $(WXBUILDDIR) | |
150 | ||
151 | cleanall: cleanapp cleanwx | |
152 | ||
153 | wxconfigtool: mkbuilddir all | |
154 | ||
155 | # Making a binary, RH Linux tarball release using the setup script. | |
156 | # It will put the result in /tmp/wxconfigtool-deliver. | |
157 | release: | |
158 | echo "#include <stdio.h>" > /tmp/appver.c | |
159 | echo "#include \"symbols.h\"" >> /tmp/appver.c | |
160 | echo "int main() { printf(\"%.2f\", ctVERSION_NUMBER); }" >> /tmp/appver.c | |
161 | cc /tmp/appver.c -I$(APPSRCDIR) -o /tmp/appver | |
162 | chmod a+x $(APPSRCDIR)/../scripts/maketarball.sh | |
163 | $(APPSRCDIR)/../scripts/maketarball.sh $(APPDIR) $(APPBUILDDIR) /tmp/wxconfigtool-deliver `/tmp/appver` # --upx | |
164 | echo The release is in /tmp/wxconfigtool-deliver. | |
165 | # rm -f /tmp/appver /tmp/appver.c | |
166 | ||
167 | # Gives a list of targets | |
168 | help: | |
169 | @echo "Targets: full, wxconfigtool, wx, cleanall, clean, cleanwx, release" | |
170 | ||
171 | ### File dependencies | |
172 | ||
173 | # Main app files | |
174 | ||
175 | $(APPBUILDDIR)/wxconfigtool.o: $(APPSRCDIR)/wxconfigtool.cpp $(APPINCDIR)/wxconfigtool.h $(APPSRCDIR)/symbols.h | |
176 | $(CXX) -c $(CXXFLAGS) $(APPEXTRADEFS) -o $@ $< | |
177 | ||
178 | $(APPBUILDDIR)/appsettings.o: $(APPSRCDIR)/appsettings.cpp $(APPSRCDIR)/appsettings.h $(APPSRCDIR)/symbols.h | |
179 | $(CXX) -c $(CXXFLAGS) $(APPEXTRADEFS) -o $@ $< | |
180 | ||
181 | $(APPBUILDDIR)/configitem.o: $(APPSRCDIR)/configitem.cpp $(APPSRCDIR)/configitem.h $(APPSRCDIR)/symbols.h | |
182 | $(CXX) -c $(CXXFLAGS) $(APPEXTRADEFS) -o $@ $< | |
183 | ||
184 | $(APPBUILDDIR)/configitemselector.o: $(APPSRCDIR)/configitemselector.cpp $(APPSRCDIR)/configitemselector.h $(APPSRCDIR)/symbols.h | |
185 | $(CXX) -c $(CXXFLAGS) $(APPEXTRADEFS) -o $@ $< | |
186 | ||
187 | $(APPBUILDDIR)/configtooldoc.o: $(APPSRCDIR)/configtooldoc.cpp $(APPSRCDIR)/configtooldoc.h $(APPSRCDIR)/symbols.h | |
188 | $(CXX) -c $(CXXFLAGS) $(APPEXTRADEFS) -o $@ $< | |
189 | ||
190 | $(APPBUILDDIR)/configtoolview.o: $(APPSRCDIR)/configtoolview.cpp $(APPSRCDIR)/configtoolview.h $(APPSRCDIR)/symbols.h | |
191 | $(CXX) -c $(CXXFLAGS) $(APPEXTRADEFS) -o $@ $< | |
192 | ||
193 | $(APPBUILDDIR)/configtree.o: $(APPSRCDIR)/configtree.cpp $(APPSRCDIR)/configtree.h $(APPSRCDIR)/symbols.h | |
194 | $(CXX) -c $(CXXFLAGS) $(APPEXTRADEFS) -o $@ $< | |
195 | ||
196 | $(APPBUILDDIR)/custompropertydialog.o: $(APPSRCDIR)/custompropertydialog.cpp $(APPSRCDIR)/custompropertydialog.h $(APPSRCDIR)/symbols.h | |
197 | $(CXX) -c $(CXXFLAGS) $(APPEXTRADEFS) -o $@ $< | |
198 | ||
199 | $(APPBUILDDIR)/htmlparser.o: $(APPSRCDIR)/htmlparser.cpp $(APPSRCDIR)/htmlparser.h $(APPSRCDIR)/symbols.h | |
200 | $(CXX) -c $(CXXFLAGS) $(APPEXTRADEFS) -o $@ $< | |
201 | ||
202 | $(APPBUILDDIR)/mainframe.o: $(APPSRCDIR)/mainframe.cpp $(APPINCDIR)/mainframe.h $(APPSRCDIR)/symbols.h | |
203 | $(CXX) -c $(CXXFLAGS) $(APPEXTRADEFS) -o $@ $< | |
204 | ||
205 | $(APPBUILDDIR)/propeditor.o: $(APPSRCDIR)/propeditor.cpp $(APPINCDIR)/propeditor.h $(APPSRCDIR)/symbols.h | |
206 | $(CXX) -c $(CXXFLAGS) $(APPEXTRADEFS) -o $@ $< | |
207 | ||
208 | $(APPBUILDDIR)/property.o: $(APPSRCDIR)/property.cpp $(APPINCDIR)/property.h $(APPSRCDIR)/symbols.h | |
209 | $(CXX) -c $(CXXFLAGS) $(APPEXTRADEFS) -o $@ $< | |
210 | ||
211 | $(APPBUILDDIR)/settingsdialog.o: $(APPSRCDIR)/settingsdialog.cpp $(APPINCDIR)/settingsdialog.h $(APPSRCDIR)/symbols.h | |
212 | $(CXX) -c $(CXXFLAGS) $(APPEXTRADEFS) -o $@ $< | |
213 | ||
214 | $(APPBUILDDIR)/utils.o: $(APPSRCDIR)/utils.cpp $(APPINCDIR)/imagewindow.h $(APPSRCDIR)/symbols.h | |
215 | $(CXX) -c $(CXXFLAGS) $(APPEXTRADEFS) -o $@ $< | |
216 | ||
217 | $(APPBUILDDIR)/wxconfigtool_resources.o: $(APPSRCDIR)/wxconfigtool.rc | |
218 | $(RESCOMP) -i $< -o $@ $(RESFLAGS) --include-dir $(APPSRCDIR) | |
219 |