]> git.saurik.com Git - wxWidgets.git/blame - utils/configtool/src/makefile_standalone.unx
Fixes tex2rtf to search for files on current folder too. This is basically to test...
[wxWidgets.git] / utils / configtool / src / makefile_standalone.unx
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
8cb4919b
JS
130# Need to place -lsupc++ at end of libs or we get
131# link errors. Note the := syntax to prevent a
132# recursive variable error.
133LDLIBS:=${LDLIBS} -lsupc++
134
059d039e
JS
135# Only omit C++ libs for economy of size on Unix
136ifeq "$(WXTOOLKIT)" "msw"
137CC=c++
138CXX=c++
139else
d7463f75
JS
140CC=gcc
141CXX=gcc
059d039e 142endif
d7463f75
JS
143
144mkbuilddir:
145 mkdir -p $(APPBUILDDIR)
146
147full: wx all
148
149# --with-libpng=builtin --with-zlib=builtin --with-libjpeg=builtin
150wx:
151 @mkdir -p $(WXBUILDDIR) ; \
152 cd $(WXBUILDDIR) ; \
153 if test ! -f Makefile ; then rm -f *.o *.d ; \
154 rm -f *.cache ; \
155 $(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 ; \
156 fi; \
157 make; cd contrib/src/xrc; make
158
159cleanapp: clean
160
161cleanwx:
162 rm -f -r $(WXBUILDDIR)
163
164cleanall: cleanapp cleanwx
165
166wxconfigtool: mkbuilddir all
167
168# Making a binary, RH Linux tarball release using the setup script.
169# It will put the result in /tmp/wxconfigtool-deliver.
170release:
171 echo "#include <stdio.h>" > /tmp/appver.c
172 echo "#include \"symbols.h\"" >> /tmp/appver.c
173 echo "int main() { printf(\"%.2f\", ctVERSION_NUMBER); }" >> /tmp/appver.c
174 cc /tmp/appver.c -I$(APPSRCDIR) -o /tmp/appver
175 chmod a+x $(APPSRCDIR)/../scripts/maketarball.sh
176 $(APPSRCDIR)/../scripts/maketarball.sh $(APPDIR) $(APPBUILDDIR) /tmp/wxconfigtool-deliver `/tmp/appver` # --upx
177 echo The release is in /tmp/wxconfigtool-deliver.
178# rm -f /tmp/appver /tmp/appver.c
179
180# Gives a list of targets
181help:
182 @echo "Targets: full, wxconfigtool, wx, cleanall, clean, cleanwx, release"
183
184### File dependencies
185
186# Main app files
187
188$(APPBUILDDIR)/wxconfigtool.o: $(APPSRCDIR)/wxconfigtool.cpp $(APPINCDIR)/wxconfigtool.h $(APPSRCDIR)/symbols.h
189 $(CXX) -c $(CXXFLAGS) $(APPEXTRADEFS) -o $@ $<
190
191$(APPBUILDDIR)/appsettings.o: $(APPSRCDIR)/appsettings.cpp $(APPSRCDIR)/appsettings.h $(APPSRCDIR)/symbols.h
192 $(CXX) -c $(CXXFLAGS) $(APPEXTRADEFS) -o $@ $<
193
194$(APPBUILDDIR)/configitem.o: $(APPSRCDIR)/configitem.cpp $(APPSRCDIR)/configitem.h $(APPSRCDIR)/symbols.h
195 $(CXX) -c $(CXXFLAGS) $(APPEXTRADEFS) -o $@ $<
196
197$(APPBUILDDIR)/configitemselector.o: $(APPSRCDIR)/configitemselector.cpp $(APPSRCDIR)/configitemselector.h $(APPSRCDIR)/symbols.h
198 $(CXX) -c $(CXXFLAGS) $(APPEXTRADEFS) -o $@ $<
199
200$(APPBUILDDIR)/configtooldoc.o: $(APPSRCDIR)/configtooldoc.cpp $(APPSRCDIR)/configtooldoc.h $(APPSRCDIR)/symbols.h
201 $(CXX) -c $(CXXFLAGS) $(APPEXTRADEFS) -o $@ $<
202
203$(APPBUILDDIR)/configtoolview.o: $(APPSRCDIR)/configtoolview.cpp $(APPSRCDIR)/configtoolview.h $(APPSRCDIR)/symbols.h
204 $(CXX) -c $(CXXFLAGS) $(APPEXTRADEFS) -o $@ $<
205
206$(APPBUILDDIR)/configtree.o: $(APPSRCDIR)/configtree.cpp $(APPSRCDIR)/configtree.h $(APPSRCDIR)/symbols.h
207 $(CXX) -c $(CXXFLAGS) $(APPEXTRADEFS) -o $@ $<
208
209$(APPBUILDDIR)/custompropertydialog.o: $(APPSRCDIR)/custompropertydialog.cpp $(APPSRCDIR)/custompropertydialog.h $(APPSRCDIR)/symbols.h
210 $(CXX) -c $(CXXFLAGS) $(APPEXTRADEFS) -o $@ $<
211
212$(APPBUILDDIR)/htmlparser.o: $(APPSRCDIR)/htmlparser.cpp $(APPSRCDIR)/htmlparser.h $(APPSRCDIR)/symbols.h
213 $(CXX) -c $(CXXFLAGS) $(APPEXTRADEFS) -o $@ $<
214
215$(APPBUILDDIR)/mainframe.o: $(APPSRCDIR)/mainframe.cpp $(APPINCDIR)/mainframe.h $(APPSRCDIR)/symbols.h
216 $(CXX) -c $(CXXFLAGS) $(APPEXTRADEFS) -o $@ $<
217
218$(APPBUILDDIR)/propeditor.o: $(APPSRCDIR)/propeditor.cpp $(APPINCDIR)/propeditor.h $(APPSRCDIR)/symbols.h
219 $(CXX) -c $(CXXFLAGS) $(APPEXTRADEFS) -o $@ $<
220
221$(APPBUILDDIR)/property.o: $(APPSRCDIR)/property.cpp $(APPINCDIR)/property.h $(APPSRCDIR)/symbols.h
222 $(CXX) -c $(CXXFLAGS) $(APPEXTRADEFS) -o $@ $<
223
224$(APPBUILDDIR)/settingsdialog.o: $(APPSRCDIR)/settingsdialog.cpp $(APPINCDIR)/settingsdialog.h $(APPSRCDIR)/symbols.h
225 $(CXX) -c $(CXXFLAGS) $(APPEXTRADEFS) -o $@ $<
226
f8105809 227$(APPBUILDDIR)/utils.o: $(APPSRCDIR)/utils.cpp $(APPINCDIR)/utils.h $(APPSRCDIR)/symbols.h
d7463f75
JS
228 $(CXX) -c $(CXXFLAGS) $(APPEXTRADEFS) -o $@ $<
229
230$(APPBUILDDIR)/wxconfigtool_resources.o: $(APPSRCDIR)/wxconfigtool.rc
231 $(RESCOMP) -i $< -o $@ $(RESFLAGS) --include-dir $(APPSRCDIR)
232