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