]> git.saurik.com Git - wxWidgets.git/blob - utils/configtool/src/Makefile
Removed compilo
[wxWidgets.git] / utils / configtool / src / Makefile
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.5
67
68 # Use the small C++ support library
69 APPEXTRALIBS=-lsupc++
70
71 # ${top_builddir}/lib/libwx_$(WXTOOLKIT)$(WXDEBUGSUFFIX)_xrc-$(WXVERSION).a
72
73 PLATFORM_OS=$(shell echo $(OS))
74
75 ifeq "$(PLATFORM_OS)" "Windows_NT"
76 ARCHITECTURE="i686"
77 WXTOOLKIT=msw
78 else
79 ARCHITECTURE=$(shell arch)
80 ifeq "$(ARCHITECTURE)" "i686"
81 WXTOOLKIT=gtk
82 else
83 WXTOOLKIT=mac
84 endif
85 endif
86
87 #printit:
88 # @echo $(PLATFORM_OS)
89
90 ifeq "$(LEVEL)" "debug"
91 WXDEBUGSUFFIX=d
92 else
93 WXDEBUGSUFFIX=
94 endif
95
96
97 # Where to find the wx-config file
98 WXCONFIG=$(WXBUILDDIR)/wx-config $(WXCONFIGFLAGS)
99
100 ifeq "$(LEVEL)" "debug"
101 WXDEBUGFLAGS=--enable-debug --enable-debug_gdb --enable-debug_cntxt
102 endif
103
104 PROGRAM=$(APPBUILDDIR)/wxconfigtool
105
106 OBJECTS = \
107 $(APPBUILDDIR)/appsettings.o \
108 $(APPBUILDDIR)/configitem.o \
109 $(APPBUILDDIR)/configitemselector.o \
110 $(APPBUILDDIR)/configtooldoc.o \
111 $(APPBUILDDIR)/configtoolview.o \
112 $(APPBUILDDIR)/configtree.o \
113 $(APPBUILDDIR)/custompropertydialog.o \
114 $(APPBUILDDIR)/htmlparser.o \
115 $(APPBUILDDIR)/mainframe.o \
116 $(APPBUILDDIR)/propeditor.o \
117 $(APPBUILDDIR)/property.o \
118 $(APPBUILDDIR)/settingsdialog.o \
119 $(APPBUILDDIR)/utils.o \
120 $(APPBUILDDIR)/wxconfigtool.o
121
122 DEPFILES=$(PROGRAM).d
123
124 ifeq "$(USEDUMMYMAKEPROG)" "1"
125 include $(APPSRCDIR)/makeprog.env
126 else
127 include $(top_builddir)/src/makeprog.env
128 endif
129
130 # Only omit C++ libs for economy of size on Unix
131 ifeq "$(WXTOOLKIT)" "msw"
132 CC=c++
133 CXX=c++
134 else
135 CC=gcc
136 CXX=gcc
137 endif
138
139 mkbuilddir:
140 mkdir -p $(APPBUILDDIR)
141
142 full: wx all
143
144 # --with-libpng=builtin --with-zlib=builtin --with-libjpeg=builtin
145 wx:
146 @mkdir -p $(WXBUILDDIR) ; \
147 cd $(WXBUILDDIR) ; \
148 if test ! -f Makefile ; then rm -f *.o *.d ; \
149 rm -f *.cache ; \
150 $(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 ; \
151 fi; \
152 make; cd contrib/src/xrc; make
153
154 cleanapp: clean
155
156 cleanwx:
157 rm -f -r $(WXBUILDDIR)
158
159 cleanall: cleanapp cleanwx
160
161 wxconfigtool: mkbuilddir all
162
163 # Making a binary, RH Linux tarball release using the setup script.
164 # It will put the result in /tmp/wxconfigtool-deliver.
165 release:
166 echo "#include <stdio.h>" > /tmp/appver.c
167 echo "#include \"symbols.h\"" >> /tmp/appver.c
168 echo "int main() { printf(\"%.2f\", ctVERSION_NUMBER); }" >> /tmp/appver.c
169 cc /tmp/appver.c -I$(APPSRCDIR) -o /tmp/appver
170 chmod a+x $(APPSRCDIR)/../scripts/maketarball.sh
171 $(APPSRCDIR)/../scripts/maketarball.sh $(APPDIR) $(APPBUILDDIR) /tmp/wxconfigtool-deliver `/tmp/appver` # --upx
172 echo The release is in /tmp/wxconfigtool-deliver.
173 # rm -f /tmp/appver /tmp/appver.c
174
175 # Gives a list of targets
176 help:
177 @echo "Targets: full, wxconfigtool, wx, cleanall, clean, cleanwx, release"
178
179 ### File dependencies
180
181 # Main app files
182
183 $(APPBUILDDIR)/wxconfigtool.o: $(APPSRCDIR)/wxconfigtool.cpp $(APPINCDIR)/wxconfigtool.h $(APPSRCDIR)/symbols.h
184 $(CXX) -c $(CXXFLAGS) $(APPEXTRADEFS) -o $@ $<
185
186 $(APPBUILDDIR)/appsettings.o: $(APPSRCDIR)/appsettings.cpp $(APPSRCDIR)/appsettings.h $(APPSRCDIR)/symbols.h
187 $(CXX) -c $(CXXFLAGS) $(APPEXTRADEFS) -o $@ $<
188
189 $(APPBUILDDIR)/configitem.o: $(APPSRCDIR)/configitem.cpp $(APPSRCDIR)/configitem.h $(APPSRCDIR)/symbols.h
190 $(CXX) -c $(CXXFLAGS) $(APPEXTRADEFS) -o $@ $<
191
192 $(APPBUILDDIR)/configitemselector.o: $(APPSRCDIR)/configitemselector.cpp $(APPSRCDIR)/configitemselector.h $(APPSRCDIR)/symbols.h
193 $(CXX) -c $(CXXFLAGS) $(APPEXTRADEFS) -o $@ $<
194
195 $(APPBUILDDIR)/configtooldoc.o: $(APPSRCDIR)/configtooldoc.cpp $(APPSRCDIR)/configtooldoc.h $(APPSRCDIR)/symbols.h
196 $(CXX) -c $(CXXFLAGS) $(APPEXTRADEFS) -o $@ $<
197
198 $(APPBUILDDIR)/configtoolview.o: $(APPSRCDIR)/configtoolview.cpp $(APPSRCDIR)/configtoolview.h $(APPSRCDIR)/symbols.h
199 $(CXX) -c $(CXXFLAGS) $(APPEXTRADEFS) -o $@ $<
200
201 $(APPBUILDDIR)/configtree.o: $(APPSRCDIR)/configtree.cpp $(APPSRCDIR)/configtree.h $(APPSRCDIR)/symbols.h
202 $(CXX) -c $(CXXFLAGS) $(APPEXTRADEFS) -o $@ $<
203
204 $(APPBUILDDIR)/custompropertydialog.o: $(APPSRCDIR)/custompropertydialog.cpp $(APPSRCDIR)/custompropertydialog.h $(APPSRCDIR)/symbols.h
205 $(CXX) -c $(CXXFLAGS) $(APPEXTRADEFS) -o $@ $<
206
207 $(APPBUILDDIR)/htmlparser.o: $(APPSRCDIR)/htmlparser.cpp $(APPSRCDIR)/htmlparser.h $(APPSRCDIR)/symbols.h
208 $(CXX) -c $(CXXFLAGS) $(APPEXTRADEFS) -o $@ $<
209
210 $(APPBUILDDIR)/mainframe.o: $(APPSRCDIR)/mainframe.cpp $(APPINCDIR)/mainframe.h $(APPSRCDIR)/symbols.h
211 $(CXX) -c $(CXXFLAGS) $(APPEXTRADEFS) -o $@ $<
212
213 $(APPBUILDDIR)/propeditor.o: $(APPSRCDIR)/propeditor.cpp $(APPINCDIR)/propeditor.h $(APPSRCDIR)/symbols.h
214 $(CXX) -c $(CXXFLAGS) $(APPEXTRADEFS) -o $@ $<
215
216 $(APPBUILDDIR)/property.o: $(APPSRCDIR)/property.cpp $(APPINCDIR)/property.h $(APPSRCDIR)/symbols.h
217 $(CXX) -c $(CXXFLAGS) $(APPEXTRADEFS) -o $@ $<
218
219 $(APPBUILDDIR)/settingsdialog.o: $(APPSRCDIR)/settingsdialog.cpp $(APPINCDIR)/settingsdialog.h $(APPSRCDIR)/symbols.h
220 $(CXX) -c $(CXXFLAGS) $(APPEXTRADEFS) -o $@ $<
221
222 $(APPBUILDDIR)/utils.o: $(APPSRCDIR)/utils.cpp $(APPINCDIR)/utils.h $(APPSRCDIR)/symbols.h
223 $(CXX) -c $(CXXFLAGS) $(APPEXTRADEFS) -o $@ $<
224
225 $(APPBUILDDIR)/wxconfigtool_resources.o: $(APPSRCDIR)/wxconfigtool.rc
226 $(RESCOMP) -i $< -o $@ $(RESFLAGS) --include-dir $(APPSRCDIR)
227