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