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