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