]> git.saurik.com Git - wxWidgets.git/blob - utils/configtool/src/makefile_standalone.unx
undef wxUSE_DIALUP_MANAGER before redefining it as 0
[wxWidgets.git] / utils / configtool / src / makefile_standalone.unx
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 # Need to place -lsupc++ at end of libs or we get
131 # link errors. Note the := syntax to prevent a
132 # recursive variable error.
133 LDLIBS:=${LDLIBS} -lsupc++
134
135 # Only omit C++ libs for economy of size on Unix
136 ifeq "$(WXTOOLKIT)" "msw"
137 CC=c++
138 CXX=c++
139 else
140 CC=gcc
141 CXX=gcc
142 endif
143
144 mkbuilddir:
145 mkdir -p $(APPBUILDDIR)
146
147 full: wx all
148
149 # --with-libpng=builtin --with-zlib=builtin --with-libjpeg=builtin
150 wx:
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
159 cleanapp: clean
160
161 cleanwx:
162 rm -f -r $(WXBUILDDIR)
163
164 cleanall: cleanapp cleanwx
165
166 wxconfigtool: 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.
170 release:
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
181 help:
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
227 $(APPBUILDDIR)/utils.o: $(APPSRCDIR)/utils.cpp $(APPINCDIR)/utils.h $(APPSRCDIR)/symbols.h
228 $(CXX) -c $(CXXFLAGS) $(APPEXTRADEFS) -o $@ $<
229
230 $(APPBUILDDIR)/wxconfigtool_resources.o: $(APPSRCDIR)/wxconfigtool.rc
231 $(RESCOMP) -i $< -o $@ $(RESFLAGS) --include-dir $(APPSRCDIR)
232