]> git.saurik.com Git - wxWidgets.git/blame - utils/configtool/src/Makefile
Removed compilo
[wxWidgets.git] / utils / configtool / src / Makefile
CommitLineData
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
32CURRDIR = $(shell pwd)
33BUILDDIR=$(CURRDIR)
34
35top_srcdir = $(WXDIR)
36top_builddir = $(WXBUILDDIR)
37program_dir =
38
39# If we don't specify a location for wxWindows to be
40# built, use a default.
41ifeq "$(top_builddir)" ""
42topbuilddir = $(CURRDIR)/wxwin-build-$(LEVEL)
43WXBUILDDIR=$(top_builddir)
44endif
45
46# ConfigTool build directory
47APPBUILDDIR=$(BUILDDIR)/wxconfigtool-build-$(LEVEL)
48
49# StartingBlocks source hierarchy
50# You have to specify this when invoking make.
51APPDIR=You_should_override_the_APPDIR_variable
52
53# ConfigTool source directory
54APPSRCDIR=$(APPDIR)/src
55
56# ConfigTool include directory
57APPINCDIR=$(APPDIR)/src
58
59# Extra includes
60APPEXTRADEFS= \
61 -I$(WXDIR)/contrib/include \
62 -I$(APPSRCDIR) \
63
64# -I$(UTILSDIR) \
65
f8105809 66WXVERSION=2.5
d7463f75
JS
67
68# Use the small C++ support library
f8105809
JS
69APPEXTRALIBS=-lsupc++
70
71# ${top_builddir}/lib/libwx_$(WXTOOLKIT)$(WXDEBUGSUFFIX)_xrc-$(WXVERSION).a
d7463f75
JS
72
73PLATFORM_OS=$(shell echo $(OS))
74
75ifeq "$(PLATFORM_OS)" "Windows_NT"
76ARCHITECTURE="i686"
77WXTOOLKIT=msw
78else
79ARCHITECTURE=$(shell arch)
80ifeq "$(ARCHITECTURE)" "i686"
81WXTOOLKIT=gtk
82else
83WXTOOLKIT=mac
84endif
85endif
86
87#printit:
88# @echo $(PLATFORM_OS)
89
90ifeq "$(LEVEL)" "debug"
91WXDEBUGSUFFIX=d
92else
93WXDEBUGSUFFIX=
94endif
95
96
97# Where to find the wx-config file
98WXCONFIG=$(WXBUILDDIR)/wx-config $(WXCONFIGFLAGS)
99
100ifeq "$(LEVEL)" "debug"
101WXDEBUGFLAGS=--enable-debug --enable-debug_gdb --enable-debug_cntxt
102endif
103
104PROGRAM=$(APPBUILDDIR)/wxconfigtool
105
106OBJECTS = \
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
122DEPFILES=$(PROGRAM).d
123
124ifeq "$(USEDUMMYMAKEPROG)" "1"
125include $(APPSRCDIR)/makeprog.env
126else
127include $(top_builddir)/src/makeprog.env
128endif
129
059d039e
JS
130# Only omit C++ libs for economy of size on Unix
131ifeq "$(WXTOOLKIT)" "msw"
132CC=c++
133CXX=c++
134else
d7463f75
JS
135CC=gcc
136CXX=gcc
059d039e 137endif
d7463f75
JS
138
139mkbuilddir:
140 mkdir -p $(APPBUILDDIR)
141
142full: wx all
143
144# --with-libpng=builtin --with-zlib=builtin --with-libjpeg=builtin
145wx:
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
154cleanapp: clean
155
156cleanwx:
157 rm -f -r $(WXBUILDDIR)
158
159cleanall: cleanapp cleanwx
160
161wxconfigtool: 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.
165release:
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
176help:
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
f8105809 222$(APPBUILDDIR)/utils.o: $(APPSRCDIR)/utils.cpp $(APPINCDIR)/utils.h $(APPSRCDIR)/symbols.h
d7463f75
JS
223 $(CXX) -c $(CXXFLAGS) $(APPEXTRADEFS) -o $@ $<
224
225$(APPBUILDDIR)/wxconfigtool_resources.o: $(APPSRCDIR)/wxconfigtool.rc
226 $(RESCOMP) -i $< -o $@ $(RESFLAGS) --include-dir $(APPSRCDIR)
227