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