]> git.saurik.com Git - wxWidgets.git/blame - utils/configtool/src/Makefile
Small fixes
[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
66WXVERSION=2.4
67
68# Use the small C++ support library
69APPEXTRALIBS=-lsupc++ ${top_builddir}/lib/libwx_$(WXTOOLKIT)$(WXDEBUGSUFFIX)_xrc-$(WXVERSION).a
70
71PLATFORM_OS=$(shell echo $(OS))
72
73ifeq "$(PLATFORM_OS)" "Windows_NT"
74ARCHITECTURE="i686"
75WXTOOLKIT=msw
76else
77ARCHITECTURE=$(shell arch)
78ifeq "$(ARCHITECTURE)" "i686"
79WXTOOLKIT=gtk
80else
81WXTOOLKIT=mac
82endif
83endif
84
85#printit:
86# @echo $(PLATFORM_OS)
87
88ifeq "$(LEVEL)" "debug"
89WXDEBUGSUFFIX=d
90else
91WXDEBUGSUFFIX=
92endif
93
94
95# Where to find the wx-config file
96WXCONFIG=$(WXBUILDDIR)/wx-config $(WXCONFIGFLAGS)
97
98ifeq "$(LEVEL)" "debug"
99WXDEBUGFLAGS=--enable-debug --enable-debug_gdb --enable-debug_cntxt
100endif
101
102PROGRAM=$(APPBUILDDIR)/wxconfigtool
103
104OBJECTS = \
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
120DEPFILES=$(PROGRAM).d
121
122ifeq "$(USEDUMMYMAKEPROG)" "1"
123include $(APPSRCDIR)/makeprog.env
124else
125include $(top_builddir)/src/makeprog.env
126endif
127
128CC=gcc
129CXX=gcc
130
131mkbuilddir:
132 mkdir -p $(APPBUILDDIR)
133
134full: wx all
135
136# --with-libpng=builtin --with-zlib=builtin --with-libjpeg=builtin
137wx:
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
146cleanapp: clean
147
148cleanwx:
149 rm -f -r $(WXBUILDDIR)
150
151cleanall: cleanapp cleanwx
152
153wxconfigtool: 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.
157release:
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
168help:
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