29531309a8104c5293e7955003749b8f7e21efd7
[xonotic/netradiant.git] / Makefile
1 -include Makefile.conf
2
3 ## CONFIGURATION SETTINGS
4 # user customizable stuf
5 # you may override this in Makefile.conf or the environment
6 BUILD              ?= debug
7 # or: release, or: extradebug, or: profile
8 OS                 ?= $(shell uname)
9 # or: Linux, Win32, Darwin
10 LDFLAGS            ?=
11 CFLAGS             ?=
12 CXXFLAGS           ?=
13 CPPFLAGS           ?=
14 LIBS               ?=
15 RADIANT_ABOUTMSG   ?= Custom build
16
17 CC                 ?= gcc
18 CXX                ?= g++
19 RANLIB             ?= ranlib
20 AR                 ?= ar
21 LDD                ?= ldd # nothing on Win32
22 WINDRES            ?= # only used on Win32
23
24 PKGCONFIG          ?= pkg-config
25 PKG_CONFIG_PATH    ?=
26
27 SH                 ?= $(SHELL)
28 ECHO               ?= echo
29 ECHO_NOLF          ?= echo -n
30 CAT                ?= cat
31 MKDIR              ?= mkdir -p
32 CP                 ?= cp
33 CP_R               ?= $(CP) -r
34 RM                 ?= rm
35 RM_R               ?= $(RM) -r
36 TEE_STDERR         ?= | tee /dev/stderr
37 TR                 ?= tr
38 FIND               ?= find
39 DIFF               ?= diff
40
41 # optional:
42 SVNVERSION         ?= svnversion
43
44 STDOUT_TO_DEVNULL  ?= >/dev/null
45 STDERR_TO_DEVNULL  ?= 2>/dev/null
46 STDERR_TO_STDOUT   ?= 2>&1
47 TO_DEVNULL         ?= $(STDOUT_TO_DEVNULL) $(STDERR_TO_STDOUT)
48
49 CPPFLAGS_GLIB      ?= $(shell PKG_CONFIG_PATH=$(PKG_CONFIG_PATH) $(PKGCONFIG) glib-2.0 --cflags $(STDERR_TO_DEVNULL))
50 LIBS_GLIB          ?= $(shell PKG_CONFIG_PATH=$(PKG_CONFIG_PATH) $(PKGCONFIG) glib-2.0 --libs-only-L $(STDERR_TO_DEVNULL)) \
51                       $(shell PKG_CONFIG_PATH=$(PKG_CONFIG_PATH) $(PKGCONFIG) glib-2.0 --libs-only-l $(STDERR_TO_DEVNULL))
52 CPPFLAGS_XML       ?= $(shell PKG_CONFIG_PATH=$(PKG_CONFIG_PATH) $(PKGCONFIG) libxml-2.0 --cflags $(STDERR_TO_DEVNULL))
53 LIBS_XML           ?= $(shell PKG_CONFIG_PATH=$(PKG_CONFIG_PATH) $(PKGCONFIG) libxml-2.0 --libs-only-L $(STDERR_TO_DEVNULL)) \
54                       $(shell PKG_CONFIG_PATH=$(PKG_CONFIG_PATH) $(PKGCONFIG) libxml-2.0 --libs-only-l $(STDERR_TO_DEVNULL))
55 CPPFLAGS_PNG       ?= $(shell PKG_CONFIG_PATH=$(PKG_CONFIG_PATH) $(PKGCONFIG) libpng --cflags $(STDERR_TO_DEVNULL))
56 LIBS_PNG           ?= $(shell PKG_CONFIG_PATH=$(PKG_CONFIG_PATH) $(PKGCONFIG) libpng --libs-only-L $(STDERR_TO_DEVNULL)) \
57                       $(shell PKG_CONFIG_PATH=$(PKG_CONFIG_PATH) $(PKGCONFIG) libpng --libs-only-l $(STDERR_TO_DEVNULL))
58 CPPFLAGS_GTK       ?= $(shell PKG_CONFIG_PATH=$(PKG_CONFIG_PATH) $(PKGCONFIG) gtk+-2.0 --cflags $(STDERR_TO_DEVNULL))
59 LIBS_GTK           ?= $(shell PKG_CONFIG_PATH=$(PKG_CONFIG_PATH) $(PKGCONFIG) gtk+-2.0 --libs-only-L $(STDERR_TO_DEVNULL)) \
60                       $(shell PKG_CONFIG_PATH=$(PKG_CONFIG_PATH) $(PKGCONFIG) gtk+-2.0 --libs-only-l $(STDERR_TO_DEVNULL))
61 CPPFLAGS_GTKGLEXT  ?= $(shell PKG_CONFIG_PATH=$(PKG_CONFIG_PATH) $(PKGCONFIG) gtkglext-1.0 --cflags $(STDERR_TO_DEVNULL))
62 LIBS_GTKGLEXT      ?= $(shell PKG_CONFIG_PATH=$(PKG_CONFIG_PATH) $(PKGCONFIG) gtkglext-1.0 --libs-only-L $(STDERR_TO_DEVNULL)) \
63                       $(shell PKG_CONFIG_PATH=$(PKG_CONFIG_PATH) $(PKGCONFIG) gtkglext-1.0 --libs-only-l $(STDERR_TO_DEVNULL))
64 CPPFLAGS_GL        ?=
65 LIBS_GL            ?= -lGL # -lopengl32 on Win32
66 CPPFLAGS_DL        ?=
67 LIBS_DL            ?= -ldl # nothing on Win32
68 CPPFLAGS_ZLIB      ?=
69 LIBS_ZLIB          ?= -lz
70 DEPEND_ON_MAKEFILE ?= yes
71 DEPENDENCIES_CHECK ?= quiet
72 # or: off, verbose
73
74 # these are used on Win32 only
75 GTKDIR             ?= $(shell PKG_CONFIG_PATH=$(PKG_CONFIG_PATH) $(PKGCONFIG) gtk+-2.0 --variable=prefix $(STDERR_TO_DEVNULL))
76 WHICHDLL           ?= which
77
78 # alias mingw32 OSes
79 ifeq ($(OS),MINGW32_NT-6.0)
80         OS = Win32
81 endif
82
83 CFLAGS_COMMON = -MMD -W -Wall -Wcast-align -Wcast-qual -Wno-unused-parameter
84 CPPFLAGS_COMMON =
85 LDFLAGS_COMMON =
86 LIBS_COMMON =
87 CXXFLAGS_COMMON = -Wno-non-virtual-dtor -Wreorder -fno-exceptions -fno-rtti
88
89 ifeq ($(BUILD),debug)
90 ifeq ($(findstring $(CFLAGS),-g),)
91         CFLAGS_COMMON += -g
92         # only add -g if no -g flag is in $(CFLAGS)
93 endif
94 ifeq ($(findstring $(CFLAGS),-O),)
95         CFLAGS_COMMON += -O
96         # only add -O if no -O flag is in $(CFLAGS)
97 endif
98         CPPFLAGS_COMMON +=
99         LDFLAGS_COMMON +=
100 else ifeq ($(BUILD),extradebug)
101 ifeq ($(findstring $(CFLAGS),-g),)
102         CFLAGS_COMMON += -g3
103         # only add -g3 if no -g flag is in $(CFLAGS)
104 endif
105         CPPFLAGS_COMMON += -D_DEBUG
106         LDFLAGS_COMMON +=
107 else ifeq ($(BUILD),profile)
108 ifeq ($(findstring $(CFLAGS),-O),)
109         CFLAGS_COMMON += -O
110         # only add -O3 if no -O flag is in $(CFLAGS)
111         # to allow overriding the optimizations
112 endif
113         CFLAGS_COMMON += -pg
114         CPPFLAGS_COMMON +=
115         LDFLAGS_COMMON += -pg
116 else ifeq ($(BUILD),release)
117 ifeq ($(findstring $(CFLAGS),-O),)
118         CFLAGS_COMMON += -O3
119         # only add -O3 if no -O flag is in $(CFLAGS)
120         # to allow overriding the optimizations
121 endif
122         CPPFLAGS_COMMON +=
123         LDFLAGS_COMMON += -s
124 else
125 $(error Unsupported build type: $(BUILD))
126 endif
127
128 ifeq ($(OS),Linux)
129         CPPFLAGS_COMMON += -DPOSIX -DXWINDOWS -D_LINUX
130         CFLAGS_COMMON += -fPIC
131         LDFLAGS_DLL = -fPIC -ldl
132         LIBS_COMMON = -lpthread
133         EXE = x86
134         A = a
135         DLL = so
136         MWINDOWS =
137 else ifeq ($(OS),Win32)
138         CPPFLAGS_COMMON += -DWIN32 -D_WIN32 -D_inline=inline
139         CFLAGS_COMMON += -mms-bitfields
140         LDFLAGS_DLL = --dll -Wl,--add-stdcall-alias
141         LIBS_COMMON = -lws2_32 -luser32 -lgdi32
142         EXE = exe
143         A = a
144         DLL = dll
145         MWINDOWS = -mwindows
146
147         # workaround: we have no "ldd" for Win32, so...
148         LDD =
149         # workaround: OpenGL library for Win32 is called opengl32.dll
150         LIBS_GL = -lopengl32
151         # workaround: no -ldl on Win32
152         LIBS_DL = 
153 #else ifeq ($(OS),Darwin)
154 #       EXE = ppc
155 else
156 $(error Unsupported build OS: $(OS))
157 endif
158
159 # VERSION!
160 RADIANT_VERSION = 1.5.0
161 RADIANT_MAJOR_VERSION = 5
162 RADIANT_MINOR_VERSION = 0
163
164 SVN_VERSION := $(shell $(SVNVERSION) -n $(STDERR_TO_DEVNULL) | $(TR) -cd 0-9:)
165 ifneq ($(SVN_VERSION),)
166         RADIANT_VERSION := $(RADIANT_VERSION)-svn$(SVN_VERSION)
167 endif
168
169 CPPFLAGS += -DRADIANT_VERSION="\"$(RADIANT_VERSION)\"" -DRADIANT_MAJOR_VERSION="\"$(RADIANT_MAJOR_VERSION)\"" -DRADIANT_MINOR_VERSION="\"$(RADIANT_MINOR_VERSION)\"" -DRADIANT_ABOUTMSG="\"$(RADIANT_ABOUTMSG)\""
170
171 .PHONY: all
172 all: \
173         dependencies-check \
174         binaries \
175         install-data \
176         install-dll \
177
178 .PHONY: dependencies-check
179 ifeq ($(findstring $(DEPENDENCIES_CHECK),off),off)
180 dependencies-check:
181         @$(ECHO) dependencies checking disabled, good luck...
182 else
183 dependencies-check:
184         @$(ECHO)
185         @if [ x"$(DEPENDENCIES_CHECK)" = x"verbose" ]; then set -x; fi; \
186         checkbinary() \
187         { \
188                 $(ECHO_NOLF) "Checking for $$2 ($$1)... "; \
189                 $$2 --help $(TO_DEVNULL); \
190                 if [ $$? != 127 ]; then \
191                         $(ECHO) "found."; \
192                 else \
193                         $(ECHO) "not found, please install it or set PATH right!"; \
194                         $(ECHO) "To see the failed commands, set DEPENDENCIES_CHECK=verbose"; \
195                         $(ECHO) "To proceed anyway, set DEPENDENCIES_CHECK=off"; \
196                         exit 1; \
197                 fi; \
198         }; \
199         $(ECHO) checking that the build tools exist; \
200         checkbinary "bash (or another shell)" "$(SH)"; \
201         checkbinary coreutils "$(ECHO)"; \
202         checkbinary coreutils "$(ECHO_NOLF)"; \
203         checkbinary coreutils "$(CAT)"; \
204         checkbinary coreutils "$(MKDIR)"; \
205         checkbinary coreutils "$(CP)"; \
206         checkbinary coreutils "$(CP_R)"; \
207         checkbinary coreutils "$(RM)"; \
208         checkbinary coreutils "$(RM_R)"; \
209         checkbinary coreutils "$(ECHO) test $(TEE_STDERR)"; \
210         checkbinary coreutils "$(TR)"; \
211         checkbinary findutils "$(FIND)"; \
212         checkbinary diff "$(DIFF)"; \
213         checkbinary gcc "$(CC)"; \
214         checkbinary g++ "$(CXX)"; \
215         checkbinary binutils "$(RANLIB)"; \
216         checkbinary binutils "$(AR)"; \
217         [ "$(OS)" = "Win32" ] && checkbinary mingw32 "$(WINDRES)"; \
218         [ "$(OS)" != "Win32" ] && checkbinary libc6 "$(LDD)"; \
219         $(ECHO) All required tools have been found!
220         @$(ECHO)
221         @if [ x"$(DEPENDENCIES_CHECK)" = x"verbose" ]; then set -x; fi; \
222         checkheader() \
223         { \
224                 $(ECHO_NOLF) "Checking for $$2 ($$1)... "; \
225                 if \
226                         $(CXX) conftest.cpp $(CFLAGS) $(CXXFLAGS) $(CFLAGS_COMMON) $(CXXFLAGS_COMMON) $(CPPFLAGS) $(CPPFLAGS_COMMON) $$4 -DCONFTEST_HEADER="<$$2>" -DCONFTEST_SYMBOL="$$3" $(TARGET_ARCH) $(LDFLAGS) -c -o conftest.o $(TO_DEVNULL) && \
227                         $(CXX) conftest.o $(LDFLAGS) $(LDFLAGS_COMMON) $$5 $(LIBS_COMMON) $(LIBS) -o conftest $(TO_DEVNULL); \
228                 then \
229                         $(RM) conftest conftest.o conftest.d; \
230                         $(ECHO) "found."; \
231                 else \
232                         $(RM) conftest conftest.o conftest.d; \
233                         $(ECHO) "not found, please install it or set PKG_CONFIG_PATH right!"; \
234                         $(ECHO) "To see the failed commands, set DEPENDENCIES_CHECK=verbose"; \
235                         $(ECHO) "To proceed anyway, set DEPENDENCIES_CHECK=off"; \
236                         exit 1; \
237                 fi; \
238         }; \
239         $(ECHO) checking that the dependencies exist; \
240         checkheader libglib2.0-dev glib/gutils.h g_path_is_absolute "$(CPPFLAGS_GLIB)" "$(LIBS_GLIB)"; \
241         checkheader libxml2-dev libxml/xpath.h xmlXPathInit "$(CPPFLAGS_XML)" "$(LIBS_XML)"; \
242         checkheader libpng12-dev png.h png_create_read_struct "$(CPPFLAGS_PNG)" "$(LIBS_PNG)"; \
243         checkheader "mesa-common-dev (or another OpenGL library)" GL/gl.h glClear "$(CPPFLAGS_GL)" "$(LIBS_GL)"; \
244         checkheader libgtk2.0-dev gtk/gtkdialog.h gtk_dialog_run "$(CPPFLAGS_GTK)" "$(LIBS_GTK)"; \
245         checkheader libgtkglext1-dev gtk/gtkglwidget.h gtk_widget_get_gl_context "$(CPPFLAGS_GTKGLEXT)" "$(LIBS_GTKGLEXT)"; \
246         [ "$(OS)" != "Win32" ] && checkheader libc6-dev dlfcn.h dlopen "$(CPPFLAGS_DL)" "$(LIBS_DL)"; \
247         checkheader zlib1g-dev zlib.h zlibVersion "$(CPPFLAGS_ZLIB)" "$(LIBS_ZLIB)"; \
248         $(ECHO) All required libraries have been found!
249         @$(ECHO)
250 endif
251
252 .PHONY: binaries
253 binaries: \
254         install/heretic2/h2data.$(EXE) \
255         install/modules/archivepak.$(DLL) \
256         install/modules/archivewad.$(DLL) \
257         install/modules/archivezip.$(DLL) \
258         install/modules/entity.$(DLL) \
259         install/modules/image.$(DLL) \
260         install/modules/imagehl.$(DLL) \
261         install/modules/imagepng.$(DLL) \
262         install/modules/imageq2.$(DLL) \
263         install/modules/mapq3.$(DLL) \
264         install/modules/mapxml.$(DLL) \
265         install/modules/md3model.$(DLL) \
266         install/modules/model.$(DLL) \
267         install/modules/shaders.$(DLL) \
268         install/modules/vfspk3.$(DLL) \
269         install/plugins/bobtoolz.$(DLL) \
270         install/plugins/brushexport.$(DLL) \
271         install/plugins/prtview.$(DLL) \
272         install/plugins/shaderplug.$(DLL) \
273         install/plugins/sunplug.$(DLL) \
274         install/plugins/ufoaiplug.$(DLL) \
275         install/q2map.$(EXE) \
276         install/q3data.$(EXE) \
277         install/q3map2.$(EXE) \
278         install/qdata3.$(EXE) \
279         install/radiant.$(EXE) \
280
281 .PHONY: clean
282 clean:
283         $(RM_R) install/
284         $(FIND) . \( -name \*.o -o -name \*.d -o -name \*.$(DLL) -o -name \*.$(A) -o -name \*.$(EXE) \) -exec $(RM) {} \;
285         $(RM) icons/*.rc
286
287 %.$(EXE):
288         file=$@; $(MKDIR) $${file%/*}
289         $(CXX) $^ $(LDFLAGS) $(LDFLAGS_COMMON) $(LDFLAGS_EXTRA) $(LIBS_EXTRA) $(LIBS_COMMON) $(LIBS) -o $@
290         [ -z "$(LDD)" ] || [ -z "`$(LDD) -r $@ $(STDERR_TO_STDOUT) $(STDOUT_TO_DEVNULL) $(TEE_STDERR)`" ] || { $(RM) $@; exit 1; }
291
292 %.$(A):
293         $(AR) rc $@ $^
294         $(RANLIB) $@
295
296 %.$(DLL):
297         file=$@; $(MKDIR) $${file%/*}
298         $(CXX) $^ $(LDFLAGS) $(LDFLAGS_COMMON) $(LDFLAGS_EXTRA) $(LDFLAGS_DLL) $(LIBS_EXTRA) $(LIBS_COMMON) $(LIBS) -shared -o $@
299         [ -z "$(LDD)" ] || [ -z "`$(LDD) -r $@ $(STDERR_TO_STDOUT) $(STDOUT_TO_DEVNULL) $(TEE_STDERR)`" ] || { $(RM) $@; exit 1; }
300
301 %.rc: %.ico
302         $(ECHO) '1 ICON "$<"' > $@
303
304 ifeq ($(OS),Win32)
305 %.o: %.rc
306         $(WINDRES) $< $@
307 endif
308
309 %.o: %.cpp $(if $(findstring $(DEPEND_ON_MAKEFILE),yes),$(wildcard Makefile*),)
310         $(CXX) $< $(CFLAGS) $(CXXFLAGS) $(CFLAGS_COMMON) $(CXXFLAGS_COMMON) $(CPPFLAGS) $(CPPFLAGS_COMMON) $(CPPFLAGS_EXTRA) $(TARGET_ARCH) -c -o $@
311
312 %.o: %.c $(if $(findstring $(DEPEND_ON_MAKEFILE),yes),$(wildcard Makefile*),)
313         $(CC) $< $(CFLAGS) $(CFLAGS_COMMON) $(CPPFLAGS) $(CPPFLAGS_COMMON) $(CPPFLAGS_EXTRA) $(TARGET_ARCH) -c -o $@
314
315 install/q3map2.$(EXE): LIBS_EXTRA := $(LIBS_XML) $(LIBS_GLIB) $(LIBS_PNG)
316 install/q3map2.$(EXE): CPPFLAGS_EXTRA := $(CPPFLAGS_XML) $(CPPFLAGS_GLIB) $(CPPFLAGS_PNG) -Itools/quake3/common -Ilibs -Iinclude
317 install/q3map2.$(EXE): \
318         tools/quake3/common/cmdlib.o \
319         tools/quake3/common/imagelib.o \
320         tools/quake3/common/inout.o \
321         tools/quake3/common/md4.o \
322         tools/quake3/common/mutex.o \
323         tools/quake3/common/polylib.o \
324         tools/quake3/common/scriplib.o \
325         tools/quake3/common/threads.o \
326         tools/quake3/common/unzip.o \
327         tools/quake3/common/vfs.o \
328         tools/quake3/q3map2/brush.o \
329         tools/quake3/q3map2/brush_primit.o \
330         tools/quake3/q3map2/bspfile_abstract.o \
331         tools/quake3/q3map2/bspfile_ibsp.o \
332         tools/quake3/q3map2/bspfile_rbsp.o \
333         tools/quake3/q3map2/bsp.o \
334         tools/quake3/q3map2/convert_ase.o \
335         tools/quake3/q3map2/convert_map.o \
336         tools/quake3/q3map2/decals.o \
337         tools/quake3/q3map2/facebsp.o \
338         tools/quake3/q3map2/fog.o \
339         tools/quake3/q3map2/image.o \
340         tools/quake3/q3map2/leakfile.o \
341         tools/quake3/q3map2/light_bounce.o \
342         tools/quake3/q3map2/lightmaps_ydnar.o \
343         tools/quake3/q3map2/light.o \
344         tools/quake3/q3map2/light_trace.o \
345         tools/quake3/q3map2/light_ydnar.o \
346         tools/quake3/q3map2/main.o \
347         tools/quake3/q3map2/map.o \
348         tools/quake3/q3map2/mesh.o \
349         tools/quake3/q3map2/model.o \
350         tools/quake3/q3map2/patch.o \
351         tools/quake3/q3map2/path_init.o \
352         tools/quake3/q3map2/portals.o \
353         tools/quake3/q3map2/prtfile.o \
354         tools/quake3/q3map2/shaders.o \
355         tools/quake3/q3map2/surface_extra.o \
356         tools/quake3/q3map2/surface_foliage.o \
357         tools/quake3/q3map2/surface_fur.o \
358         tools/quake3/q3map2/surface_meta.o \
359         tools/quake3/q3map2/surface.o \
360         tools/quake3/q3map2/tjunction.o \
361         tools/quake3/q3map2/tree.o \
362         tools/quake3/q3map2/visflow.o \
363         tools/quake3/q3map2/vis.o \
364         tools/quake3/q3map2/writebsp.o \
365         libddslib.$(A) \
366         libjpeg6.$(A) \
367         libl_net.$(A) \
368         libmathlib.$(A) \
369         libpicomodel.$(A) \
370         $(if $(findstring $(OS),Win32),icons/q3map2.o,) \
371
372 libmathlib.$(A): CPPFLAGS_EXTRA := -Ilibs
373 libmathlib.$(A): \
374         libs/mathlib/bbox.o \
375         libs/mathlib/line.o \
376         libs/mathlib/m4x4.o \
377         libs/mathlib/mathlib.o \
378         libs/mathlib/ray.o \
379
380 libl_net.$(A): CPPFLAGS_EXTRA := -Ilibs
381 libl_net.$(A): \
382         libs/l_net/l_net.o \
383         $(if $(findstring $(OS),Win32),libs/l_net/l_net_wins.o,libs/l_net/l_net_berkley.o) \
384
385 libjpeg6.$(A): CPPFLAGS_EXTRA := -Ilibs/jpeg6 -Ilibs
386 libjpeg6.$(A): \
387         libs/jpeg6/jcomapi.o \
388         libs/jpeg6/jdapimin.o \
389         libs/jpeg6/jdapistd.o \
390         libs/jpeg6/jdatasrc.o \
391         libs/jpeg6/jdcoefct.o \
392         libs/jpeg6/jdcolor.o \
393         libs/jpeg6/jddctmgr.o \
394         libs/jpeg6/jdhuff.o \
395         libs/jpeg6/jdinput.o \
396         libs/jpeg6/jdmainct.o \
397         libs/jpeg6/jdmarker.o \
398         libs/jpeg6/jdmaster.o \
399         libs/jpeg6/jdpostct.o \
400         libs/jpeg6/jdsample.o \
401         libs/jpeg6/jdtrans.o \
402         libs/jpeg6/jerror.o \
403         libs/jpeg6/jfdctflt.o \
404         libs/jpeg6/jidctflt.o \
405         libs/jpeg6/jmemmgr.o \
406         libs/jpeg6/jmemnobs.o \
407         libs/jpeg6/jpgload.o \
408         libs/jpeg6/jutils.o \
409
410 libpicomodel.$(A): CPPFLAGS_EXTRA := -Ilibs
411 libpicomodel.$(A): \
412         libs/picomodel/lwo/clip.o \
413         libs/picomodel/lwo/envelope.o \
414         libs/picomodel/lwo/list.o \
415         libs/picomodel/lwo/lwio.o \
416         libs/picomodel/lwo/lwo2.o \
417         libs/picomodel/lwo/lwob.o \
418         libs/picomodel/lwo/pntspols.o \
419         libs/picomodel/lwo/surface.o \
420         libs/picomodel/lwo/vecmath.o \
421         libs/picomodel/lwo/vmap.o \
422         libs/picomodel/picointernal.o \
423         libs/picomodel/picomodel.o \
424         libs/picomodel/picomodules.o \
425         libs/picomodel/pm_3ds.o \
426         libs/picomodel/pm_ase.o \
427         libs/picomodel/pm_fm.o \
428         libs/picomodel/pm_lwo.o \
429         libs/picomodel/pm_md2.o \
430         libs/picomodel/pm_md3.o \
431         libs/picomodel/pm_mdc.o \
432         libs/picomodel/pm_ms3d.o \
433         libs/picomodel/pm_obj.o \
434         libs/picomodel/pm_terrain.o \
435
436 libddslib.$(A): CPPFLAGS_EXTRA := -Ilibs
437 libddslib.$(A): \
438         libs/ddslib/ddslib.o \
439
440 install/q3data.$(EXE): LIBS_EXTRA := $(LIBS_XML) $(LIBS_GLIB)
441 install/q3data.$(EXE): CPPFLAGS_EXTRA := $(CPPFLAGS_XML) $(CPPFLAGS_GLIB) -Itools/quake3/common -Ilibs -Iinclude
442 install/q3data.$(EXE): \
443         tools/quake3/common/aselib.o \
444         tools/quake3/common/bspfile.o \
445         tools/quake3/common/cmdlib.o \
446         tools/quake3/common/imagelib.o \
447         tools/quake3/common/inout.o \
448         tools/quake3/common/md4.o \
449         tools/quake3/common/scriplib.o \
450         tools/quake3/common/trilib.o \
451         tools/quake3/common/unzip.o \
452         tools/quake3/common/vfs.o \
453         tools/quake3/q3data/3dslib.o \
454         tools/quake3/q3data/compress.o \
455         tools/quake3/q3data/images.o \
456         tools/quake3/q3data/md3lib.o \
457         tools/quake3/q3data/models.o \
458         tools/quake3/q3data/p3dlib.o \
459         tools/quake3/q3data/polyset.o \
460         tools/quake3/q3data/q3data.o \
461         tools/quake3/q3data/stripper.o \
462         tools/quake3/q3data/video.o \
463         libl_net.$(A) \
464         libmathlib.$(A) \
465         $(if $(findstring $(OS),Win32),icons/q3data.o,) \
466
467 install/radiant.$(EXE): LDFLAGS_EXTRA := $(MWINDOWS)
468 install/radiant.$(EXE): LIBS_EXTRA := $(LIBS_GL) $(LIBS_DL) $(LIBS_XML) $(LIBS_GLIB) $(LIBS_GTK) $(LIBS_GTKGLEXT)
469 install/radiant.$(EXE): CPPFLAGS_EXTRA := $(CPPFLAGS_GL) $(CPPFLAGS_DL) $(CPPFLAGS_XML) $(CPPFLAGS_GLIB) $(CPPFLAGS_GTK) $(CPPFLAGS_GTKGLEXT) -Ilibs -Iinclude
470 install/radiant.$(EXE): \
471         radiant/autosave.o \
472         radiant/brushmanip.o \
473         radiant/brushmodule.o \
474         radiant/brushnode.o \
475         radiant/brush.o \
476         radiant/brush_primit.o \
477         radiant/brushtokens.o \
478         radiant/brushxml.o \
479         radiant/build.o \
480         radiant/camwindow.o \
481         radiant/clippertool.o \
482         radiant/commands.o \
483         radiant/console.o \
484         radiant/csg.o \
485         radiant/dialog.o \
486         radiant/eclass_def.o \
487         radiant/eclass_doom3.o \
488         radiant/eclass_fgd.o \
489         radiant/eclass.o \
490         radiant/eclass_xml.o \
491         radiant/entityinspector.o \
492         radiant/entitylist.o \
493         radiant/entity.o \
494         radiant/environment.o \
495         radiant/error.o \
496         radiant/feedback.o \
497         radiant/filetypes.o \
498         radiant/filters.o \
499         radiant/findtexturedialog.o \
500         radiant/glwidget.o \
501         radiant/grid.o \
502         radiant/groupdialog.o \
503         radiant/gtkdlgs.o \
504         radiant/gtkmisc.o \
505         radiant/help.o \
506         radiant/image.o \
507         radiant/mainframe.o \
508         radiant/main.o \
509         radiant/map.o \
510         $(if $(findstring $(OS),Win32),radiant/multimon.o,) \
511         radiant/mru.o \
512         radiant/nullmodel.o \
513         radiant/parse.o \
514         radiant/patchdialog.o \
515         radiant/patchmanip.o \
516         radiant/patchmodule.o \
517         radiant/patch.o \
518         radiant/pluginapi.o \
519         radiant/pluginmanager.o \
520         radiant/pluginmenu.o \
521         radiant/plugin.o \
522         radiant/plugintoolbar.o \
523         radiant/points.o \
524         radiant/preferencedictionary.o \
525         radiant/preferences.o \
526         radiant/qe3.o \
527         radiant/qgl.o \
528         radiant/referencecache.o \
529         radiant/renderer.o \
530         radiant/renderstate.o \
531         radiant/scenegraph.o \
532         radiant/selection.o \
533         radiant/select.o \
534         radiant/server.o \
535         radiant/shaders.o \
536         radiant/sockets.o \
537         radiant/stacktrace.o \
538         radiant/surfacedialog.o \
539         radiant/texmanip.o \
540         radiant/textures.o \
541         radiant/texwindow.o \
542         radiant/timer.o \
543         radiant/treemodel.o \
544         radiant/undo.o \
545         radiant/url.o \
546         radiant/view.o \
547         radiant/watchbsp.o \
548         radiant/winding.o \
549         radiant/windowobservers.o \
550         radiant/xmlstuff.o \
551         radiant/xywindow.o \
552         libcmdlib.$(A) \
553         libgtkutil.$(A) \
554         libl_net.$(A) \
555         libmathlib.$(A) \
556         libprofile.$(A) \
557         libxmllib.$(A) \
558         $(if $(findstring $(OS),Win32),icons/radiant.o,) \
559
560 libcmdlib.$(A): CPPFLAGS_EXTRA := -Ilibs
561 libcmdlib.$(A): \
562         libs/cmdlib/cmdlib.o \
563
564 libprofile.$(A): CPPFLAGS_EXTRA := -Ilibs -Iinclude
565 libprofile.$(A): \
566         libs/profile/file.o \
567         libs/profile/profile.o \
568
569 libgtkutil.$(A): CPPFLAGS_EXTRA := $(CPPFLAGS_GLIB) $(CPPFLAGS_GTK) $(CPPFLAGS_GTKGLEXT) -Ilibs -Iinclude
570 libgtkutil.$(A): \
571         libs/gtkutil/accelerator.o \
572         libs/gtkutil/button.o \
573         libs/gtkutil/clipboard.o \
574         libs/gtkutil/closure.o \
575         libs/gtkutil/container.o \
576         libs/gtkutil/cursor.o \
577         libs/gtkutil/dialog.o \
578         libs/gtkutil/entry.o \
579         libs/gtkutil/filechooser.o \
580         libs/gtkutil/frame.o \
581         libs/gtkutil/glfont.o \
582         libs/gtkutil/glwidget.o \
583         libs/gtkutil/idledraw.o \
584         libs/gtkutil/image.o \
585         libs/gtkutil/menu.o \
586         libs/gtkutil/messagebox.o \
587         libs/gtkutil/nonmodal.o \
588         libs/gtkutil/paned.o \
589         libs/gtkutil/pointer.o \
590         libs/gtkutil/toolbar.o \
591         libs/gtkutil/widget.o \
592         libs/gtkutil/window.o \
593         libs/gtkutil/xorrectangle.o \
594
595 libxmllib.$(A): CPPFLAGS_EXTRA := $(CPPFLAGS_XML) $(CPPFLAGS_GLIB) -Ilibs -Iinclude
596 libxmllib.$(A): \
597         libs/xml/ixml.o \
598         libs/xml/xmlelement.o \
599         libs/xml/xmlparser.o \
600         libs/xml/xmltextags.o \
601         libs/xml/xmlwriter.o \
602
603 install/modules/archivezip.$(DLL): LIBS_EXTRA := $(LIBS_ZLIB)
604 install/modules/archivezip.$(DLL): CPPFLAGS_EXTRA := $(CPPFLAGS_ZLIB) -Ilibs -Iinclude
605 install/modules/archivezip.$(DLL): \
606         plugins/archivezip/archive.o \
607         plugins/archivezip/pkzip.o \
608         plugins/archivezip/plugin.o \
609         plugins/archivezip/zlibstream.o \
610
611 install/modules/archivewad.$(DLL): CPPFLAGS_EXTRA := -Ilibs -Iinclude
612 install/modules/archivewad.$(DLL): \
613         plugins/archivewad/archive.o \
614         plugins/archivewad/plugin.o \
615         plugins/archivewad/wad.o \
616
617 install/modules/archivepak.$(DLL): CPPFLAGS_EXTRA := -Ilibs -Iinclude
618 install/modules/archivepak.$(DLL): \
619         plugins/archivepak/archive.o \
620         plugins/archivepak/pak.o \
621         plugins/archivepak/plugin.o \
622
623 install/modules/entity.$(DLL): CPPFLAGS_EXTRA := -Ilibs -Iinclude
624 install/modules/entity.$(DLL): \
625         plugins/entity/angle.o \
626         plugins/entity/angles.o \
627         plugins/entity/colour.o \
628         plugins/entity/doom3group.o \
629         plugins/entity/eclassmodel.o \
630         plugins/entity/entity.o \
631         plugins/entity/filters.o \
632         plugins/entity/generic.o \
633         plugins/entity/group.o \
634         plugins/entity/light.o \
635         plugins/entity/miscmodel.o \
636         plugins/entity/model.o \
637         plugins/entity/modelskinkey.o \
638         plugins/entity/namedentity.o \
639         plugins/entity/origin.o \
640         plugins/entity/plugin.o \
641         plugins/entity/rotation.o \
642         plugins/entity/scale.o \
643         plugins/entity/skincache.o \
644         plugins/entity/targetable.o \
645
646 install/modules/image.$(DLL): CPPFLAGS_EXTRA := -Ilibs -Iinclude
647 install/modules/image.$(DLL): \
648         plugins/image/bmp.o \
649         plugins/image/dds.o \
650         plugins/image/image.o \
651         plugins/image/jpeg.o \
652         plugins/image/pcx.o \
653         plugins/image/tga.o \
654         libddslib.$(A) \
655         libjpeg6.$(A) \
656
657 install/modules/imageq2.$(DLL): CPPFLAGS_EXTRA := -Ilibs -Iinclude
658 install/modules/imageq2.$(DLL): \
659         plugins/imageq2/imageq2.o \
660         plugins/imageq2/wal32.o \
661         plugins/imageq2/wal.o \
662
663 install/modules/imagehl.$(DLL): CPPFLAGS_EXTRA := -Ilibs -Iinclude
664 install/modules/imagehl.$(DLL): \
665         plugins/imagehl/hlw.o \
666         plugins/imagehl/imagehl.o \
667         plugins/imagehl/mip.o \
668         plugins/imagehl/sprite.o \
669
670 install/modules/imagepng.$(DLL): LIBS_EXTRA := $(LIBS_PNG)
671 install/modules/imagepng.$(DLL): CPPFLAGS_EXTRA := $(CPPFLAGS_PNG) -Ilibs -Iinclude
672 install/modules/imagepng.$(DLL): \
673         plugins/imagepng/plugin.o \
674
675 install/modules/mapq3.$(DLL): CPPFLAGS_EXTRA := -Ilibs -Iinclude
676 install/modules/mapq3.$(DLL): \
677         plugins/mapq3/parse.o \
678         plugins/mapq3/plugin.o \
679         plugins/mapq3/write.o \
680
681 install/modules/mapxml.$(DLL): LIBS_EXTRA := $(LIBS_XML) $(LIBS_GLIB)
682 install/modules/mapxml.$(DLL): CPPFLAGS_EXTRA := $(CPPFLAGS_XML) $(CPPFLAGS_GLIB) -Ilibs -Iinclude
683 install/modules/mapxml.$(DLL): \
684         plugins/mapxml/plugin.o \
685         plugins/mapxml/xmlparse.o \
686         plugins/mapxml/xmlwrite.o \
687
688 install/modules/md3model.$(DLL): CPPFLAGS_EXTRA := -Ilibs -Iinclude
689 install/modules/md3model.$(DLL): \
690         plugins/md3model/md2.o \
691         plugins/md3model/md3.o \
692         plugins/md3model/md5.o \
693         plugins/md3model/mdc.o \
694         plugins/md3model/mdlimage.o \
695         plugins/md3model/mdl.o \
696         plugins/md3model/plugin.o \
697
698 install/modules/model.$(DLL): CPPFLAGS_EXTRA := -Ilibs -Iinclude
699 install/modules/model.$(DLL): \
700         plugins/model/model.o \
701         plugins/model/plugin.o \
702         libpicomodel.$(A) \
703
704 install/modules/shaders.$(DLL): LIBS_EXTRA := $(LIBS_GLIB)
705 install/modules/shaders.$(DLL): CPPFLAGS_EXTRA := $(CPPFLAGS_GLIB) -Ilibs -Iinclude
706 install/modules/shaders.$(DLL): \
707         plugins/shaders/plugin.o \
708         plugins/shaders/shaders.o \
709
710 install/modules/vfspk3.$(DLL): LIBS_EXTRA := $(LIBS_GLIB)
711 install/modules/vfspk3.$(DLL): CPPFLAGS_EXTRA := $(CPPFLAGS_GLIB) -Ilibs -Iinclude
712 install/modules/vfspk3.$(DLL): \
713         plugins/vfspk3/archive.o \
714         plugins/vfspk3/vfs.o \
715         plugins/vfspk3/vfspk3.o \
716
717 install/plugins/bobtoolz.$(DLL): LIBS_EXTRA := $(LIBS_GLIB) $(LIBS_GTK)
718 install/plugins/bobtoolz.$(DLL): CPPFLAGS_EXTRA := $(CPPFLAGS_GLIB) $(CPPFLAGS_GTK) -Ilibs -Iinclude
719 install/plugins/bobtoolz.$(DLL): \
720         contrib/bobtoolz/bobToolz-GTK.o \
721         contrib/bobtoolz/bsploader.o \
722         contrib/bobtoolz/cportals.o \
723         contrib/bobtoolz/DBobView.o \
724         contrib/bobtoolz/DBrush.o \
725         contrib/bobtoolz/DEntity.o \
726         contrib/bobtoolz/DEPair.o \
727         contrib/bobtoolz/dialogs/dialogs-gtk.o \
728         contrib/bobtoolz/DMap.o \
729         contrib/bobtoolz/DPatch.o \
730         contrib/bobtoolz/DPlane.o \
731         contrib/bobtoolz/DPoint.o \
732         contrib/bobtoolz/DShape.o \
733         contrib/bobtoolz/DTrainDrawer.o \
734         contrib/bobtoolz/DTreePlanter.o \
735         contrib/bobtoolz/DVisDrawer.o \
736         contrib/bobtoolz/DWinding.o \
737         contrib/bobtoolz/funchandlers-GTK.o \
738         contrib/bobtoolz/lists.o \
739         contrib/bobtoolz/misc.o \
740         contrib/bobtoolz/ScriptParser.o \
741         contrib/bobtoolz/shapes.o \
742         contrib/bobtoolz/visfind.o \
743         libcmdlib.$(A) \
744         libmathlib.$(A) \
745         libprofile.$(A) \
746
747 install/plugins/brushexport.$(DLL): LIBS_EXTRA := $(LIBS_GLIB) $(LIBS_GTK)
748 install/plugins/brushexport.$(DLL): CPPFLAGS_EXTRA := $(CPPFLAGS_GLIB) $(CPPFLAGS_GTK) -Ilibs -Iinclude
749 install/plugins/brushexport.$(DLL): \
750         contrib/brushexport/callbacks.o \
751         contrib/brushexport/export.o \
752         contrib/brushexport/interface.o \
753         contrib/brushexport/plugin.o \
754         contrib/brushexport/support.o \
755
756 install/plugins/prtview.$(DLL): LIBS_EXTRA := $(LIBS_GLIB) $(LIBS_GTK)
757 install/plugins/prtview.$(DLL): CPPFLAGS_EXTRA := $(CPPFLAGS_GLIB) $(CPPFLAGS_GTK) -Ilibs -Iinclude
758 install/plugins/prtview.$(DLL): \
759         contrib/prtview/AboutDialog.o \
760         contrib/prtview/ConfigDialog.o \
761         contrib/prtview/LoadPortalFileDialog.o \
762         contrib/prtview/portals.o \
763         contrib/prtview/prtview.o \
764         libprofile.$(A) \
765
766 install/plugins/shaderplug.$(DLL): LIBS_EXTRA := $(LIBS_GLIB) $(LIBS_GTK) $(LIBS_XML)
767 install/plugins/shaderplug.$(DLL): CPPFLAGS_EXTRA := $(CPPFLAGS_GLIB) $(CPPFLAGS_GTK) $(CPPFLAGS_XML) -Ilibs -Iinclude
768 install/plugins/shaderplug.$(DLL): \
769         contrib/shaderplug/shaderplug.o \
770         libxmllib.$(A) \
771
772 install/plugins/sunplug.$(DLL): LIBS_EXTRA := $(LIBS_GLIB) $(LIBS_GTK)
773 install/plugins/sunplug.$(DLL): CPPFLAGS_EXTRA := $(CPPFLAGS_GLIB) $(CPPFLAGS_GTK) -Ilibs -Iinclude
774 install/plugins/sunplug.$(DLL): \
775         contrib/sunplug/sunplug.o \
776
777 install/qdata3.$(EXE): LIBS_EXTRA := $(LIBS_XML)
778 install/qdata3.$(EXE): CPPFLAGS_EXTRA := $(CPPFLAGS_XML) -Itools/quake2/common -Ilibs -Iinclude
779 install/qdata3.$(EXE): \
780         tools/quake2/common/bspfile.o \
781         tools/quake2/common/cmdlib.o \
782         tools/quake2/common/inout.o \
783         tools/quake2/common/l3dslib.o \
784         tools/quake2/common/lbmlib.o \
785         tools/quake2/common/mathlib.o \
786         tools/quake2/common/md4.o \
787         tools/quake2/common/path_init.o \
788         tools/quake2/common/polylib.o \
789         tools/quake2/common/scriplib.o \
790         tools/quake2/common/threads.o \
791         tools/quake2/common/trilib.o \
792         tools/quake2/qdata/images.o \
793         tools/quake2/qdata/models.o \
794         tools/quake2/qdata/qdata.o \
795         tools/quake2/qdata/sprites.o \
796         tools/quake2/qdata/tables.o \
797         tools/quake2/qdata/video.o \
798         libl_net.$(A) \
799         $(if $(findstring $(OS),Win32),icons/qdata3.o,) \
800
801 install/q2map.$(EXE): LIBS_EXTRA := $(LIBS_XML)
802 install/q2map.$(EXE): CPPFLAGS_EXTRA := $(CPPFLAGS_XML) -Itools/quake2/common -Ilibs -Iinclude
803 install/q2map.$(EXE): \
804         tools/quake2/common/bspfile.o \
805         tools/quake2/common/cmdlib.o \
806         tools/quake2/common/inout.o \
807         tools/quake2/common/l3dslib.o \
808         tools/quake2/common/lbmlib.o \
809         tools/quake2/common/mathlib.o \
810         tools/quake2/common/md4.o \
811         tools/quake2/common/path_init.o \
812         tools/quake2/common/polylib.o \
813         tools/quake2/common/scriplib.o \
814         tools/quake2/common/threads.o \
815         tools/quake2/common/trilib.o \
816         tools/quake2/q2map/brushbsp.o \
817         tools/quake2/q2map/csg.o \
818         tools/quake2/q2map/faces.o \
819         tools/quake2/q2map/flow.o \
820         tools/quake2/q2map/glfile.o \
821         tools/quake2/q2map/leakfile.o \
822         tools/quake2/q2map/lightmap.o \
823         tools/quake2/q2map/main.o \
824         tools/quake2/q2map/map.o \
825         tools/quake2/q2map/nodraw.o \
826         tools/quake2/q2map/patches.o \
827         tools/quake2/q2map/portals.o \
828         tools/quake2/q2map/prtfile.o \
829         tools/quake2/q2map/qbsp.o \
830         tools/quake2/q2map/qrad.o \
831         tools/quake2/q2map/qvis.o \
832         tools/quake2/q2map/textures.o \
833         tools/quake2/q2map/trace.o \
834         tools/quake2/q2map/tree.o \
835         tools/quake2/q2map/writebsp.o \
836         libl_net.$(A) \
837         $(if $(findstring $(OS),Win32),icons/q2map.o,) \
838
839 install/plugins/ufoaiplug.$(DLL): LIBS_EXTRA := $(LIBS_GLIB) $(LIBS_GTK)
840 install/plugins/ufoaiplug.$(DLL): CPPFLAGS_EXTRA := $(CPPFLAGS_GLIB) $(CPPFLAGS_GTK) -Ilibs -Iinclude
841 install/plugins/ufoaiplug.$(DLL): \
842         contrib/ufoaiplug/ufoai_filters.o \
843         contrib/ufoaiplug/ufoai_gtk.o \
844         contrib/ufoaiplug/ufoai_level.o \
845         contrib/ufoaiplug/ufoai.o \
846
847 #install/plugins/bkgrnd2d.$(DLL): LIBS_EXTRA := $(LIBS_GLIB) $(LIBS_GTK)
848 #install/plugins/bkgrnd2d.$(DLL): CPPFLAGS_EXTRA := $(CPPFLAGS_GLIB) $(CPPFLAGS_GTK) -Ilibs -Iinclude
849 #install/plugins/bkgrnd2d.$(DLL): \
850 #       contrib/bkgrnd2d/bkgrnd2d.o \
851 #       contrib/bkgrnd2d/dialog.o \
852 #       contrib/bkgrnd2d/plugin.o \
853
854 install/heretic2/h2data.$(EXE): LIBS_EXTRA := $(LIBS_XML)
855 install/heretic2/h2data.$(EXE): CPPFLAGS_EXTRA := $(CPPFLAGS_XML) -Itools/quake2/qdata_heretic2/common -Itools/quake2/qdata_heretic2/qcommon -Itools/quake2/qdata_heretic2 -Itools/quake2/common -Ilibs -Iinclude
856 install/heretic2/h2data.$(EXE): \
857         tools/quake2/qdata_heretic2/common/bspfile.o \
858         tools/quake2/qdata_heretic2/common/cmdlib.o \
859         tools/quake2/qdata_heretic2/common/inout.o \
860         tools/quake2/qdata_heretic2/common/l3dslib.o \
861         tools/quake2/qdata_heretic2/common/lbmlib.o \
862         tools/quake2/qdata_heretic2/common/mathlib.o \
863         tools/quake2/qdata_heretic2/common/md4.o \
864         tools/quake2/qdata_heretic2/common/path_init.o \
865         tools/quake2/qdata_heretic2/common/qfiles.o \
866         tools/quake2/qdata_heretic2/common/scriplib.o \
867         tools/quake2/qdata_heretic2/common/threads.o \
868         tools/quake2/qdata_heretic2/common/token.o \
869         tools/quake2/qdata_heretic2/common/trilib.o \
870         tools/quake2/qdata_heretic2/qcommon/reference.o \
871         tools/quake2/qdata_heretic2/qcommon/resourcemanager.o \
872         tools/quake2/qdata_heretic2/qcommon/skeletons.o \
873         tools/quake2/qdata_heretic2/animcomp.o \
874         tools/quake2/qdata_heretic2/book.o \
875         tools/quake2/qdata_heretic2/fmodels.o \
876         tools/quake2/qdata_heretic2/images.o \
877         tools/quake2/qdata_heretic2/jointed.o \
878         tools/quake2/qdata_heretic2/models.o \
879         tools/quake2/qdata_heretic2/pics.o \
880         tools/quake2/qdata_heretic2/qdata.o \
881         tools/quake2/qdata_heretic2/qd_skeletons.o \
882         tools/quake2/qdata_heretic2/sprites.o \
883         tools/quake2/qdata_heretic2/svdcmp.o \
884         tools/quake2/qdata_heretic2/tables.o \
885         tools/quake2/qdata_heretic2/tmix.o \
886         tools/quake2/qdata_heretic2/video.o \
887         libl_net.$(A) \
888         $(if $(findstring $(OS),Win32),icons/h2data.o,) \
889
890 .PHONY: install-data
891 install-data: binaries
892         $(MKDIR) install/games
893         $(FIND) install/ -name .svn -exec $(RM_R) {} \; -prune
894         set -ex; \
895         for GAME in games/*; do \
896                 if [ -d "$$GAME/tools" ]; then \
897                         GAME=$$GAME/tools; \
898                 fi; \
899                 for GAMEFILE in $$GAME/games/*.game; do \
900                         $(CP) "$$GAMEFILE" install/games/; \
901                 done; \
902                 for GAMEDIR in $$GAME/*.game; do \
903                         $(CP_R) "$$GAMEDIR" install/; \
904                 done; \
905         done
906         $(ECHO) $(RADIANT_MINOR_VERSION) > install/RADIANT_MINOR
907         $(ECHO) $(RADIANT_MAJOR_VERSION) > install/RADIANT_MAJOR
908         $(CP_R) setup/data/tools/* install/
909         $(FIND) install/ -name .svn -exec $(RM_R) {} \; -prune
910
911 .PHONY: install-dll
912 ifeq ($(OS),Win32)
913 install-dll: binaries
914         MKDIR="$(MKDIR)" CP="$(CP)" CAT="$(CAT)" GTKDIR="$(GTKDIR)" WHICHDLL="$(WHICHDLL)" $(SH) install-dlls.sh
915 else
916 install-dll: binaries
917         @$(ECHO) No DLL inclusion implemented for this target.
918 endif
919
920 -include $(shell find . -name \*.d)