1 MAKEFILE_CONF ?= Makefile.conf
2 -include $(MAKEFILE_CONF)
4 ## CONFIGURATION SETTINGS
5 # user customizable stuf
6 # you may override this in Makefile.conf or the environment
8 # or: release, or: extradebug, or: profile
10 # or: Linux, Win32, Darwin
16 RADIANT_ABOUTMSG ?= Custom build
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!
26 LDD ?= ldd # nothing on Win32
27 WINDRES ?= # only used on Win32
29 PKGCONFIG ?= pkg-config
41 TEE_STDERR ?= | tee /dev/stderr
48 SVNVERSION ?= svnversion
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)
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))
71 LIBS_GL ?= -lGL # -lopengl32 on Win32
73 LIBS_DL ?= -ldl # nothing on Win32
76 DEPEND_ON_MAKEFILE ?= yes
77 DEPENDENCIES_CHECK ?= quiet
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))
85 ifeq ($(OS),MINGW32_NT-6.0)
89 CFLAGS_COMMON = -MMD -W -Wall -Wcast-align -Wcast-qual -Wno-unused-parameter
93 CXXFLAGS_COMMON = -Wno-non-virtual-dtor -Wreorder -fno-exceptions -fno-rtti
96 ifeq ($(findstring $(CFLAGS),-g),)
98 # only add -g if no -g flag is in $(CFLAGS)
100 ifeq ($(findstring $(CFLAGS),-O),)
102 # only add -O if no -O flag is in $(CFLAGS)
108 ifeq ($(BUILD),extradebug)
109 ifeq ($(findstring $(CFLAGS),-g),)
111 # only add -g3 if no -g flag is in $(CFLAGS)
113 CPPFLAGS_COMMON += -D_DEBUG
116 ifeq ($(BUILD),profile)
117 ifeq ($(findstring $(CFLAGS),-g),)
119 # only add -g if no -g flag is in $(CFLAGS)
121 ifeq ($(findstring $(CFLAGS),-O),)
123 # only add -O if no -O flag is in $(CFLAGS)
127 LDFLAGS_COMMON += -pg
130 ifeq ($(BUILD),release)
131 ifeq ($(findstring $(CFLAGS),-O),)
133 # only add -O3 if no -O flag is in $(CFLAGS)
134 # to allow overriding the optimizations
140 $(error Unsupported build type: $(BUILD))
147 CPPFLAGS_COMMON += -DPOSIX -DXWINDOWS -D_LINUX
148 CFLAGS_COMMON += -fPIC
149 LDFLAGS_DLL = -fPIC -ldl
150 LIBS_COMMON = -lpthread
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
165 # workaround: we have no "ldd" for Win32, so...
167 # workaround: OpenGL library for Win32 is called opengl32.dll
169 # workaround: no -ldl on Win32
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
178 $(error Unsupported build OS: $(OS) - please complete the Darwin support in this Makefile and submit a patch)
180 $(error Unsupported build OS: $(OS))
184 RADIANT_VERSION = 1.5.0
185 RADIANT_MAJOR_VERSION = 5
186 RADIANT_MINOR_VERSION = 0
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)
193 CPPFLAGS += -DRADIANT_VERSION="\"$(RADIANT_VERSION)\"" -DRADIANT_MAJOR_VERSION="\"$(RADIANT_MAJOR_VERSION)\"" -DRADIANT_MINOR_VERSION="\"$(RADIANT_MINOR_VERSION)\"" -DRADIANT_ABOUTMSG="\"$(RADIANT_ABOUTMSG)\""
202 .PHONY: dependencies-check
203 ifeq ($(findstring $(DEPENDENCIES_CHECK),off),off)
205 @$(ECHO) dependencies checking disabled, good luck...
209 @if [ x"$(DEPENDENCIES_CHECK)" = x"verbose" ]; then set -x; fi; \
212 $(ECHO_NOLF) "Checking for $$2 ($$1)... "; \
213 $$2 --help $(TO_DEVNULL); \
214 if [ $$? != 127 ]; then \
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"; \
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!
245 @if [ x"$(DEPENDENCIES_CHECK)" = x"verbose" ]; then set -x; fi; \
248 $(ECHO_NOLF) "Checking for $$2 ($$1)... "; \
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); \
253 $(RM) conftest conftest.o conftest.d; \
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"; \
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!
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) \
307 $(RM_R) $(INSTALLDIR)/
308 $(FIND) . \( -name \*.o -o -name \*.d -o -name \*.$(DLL) -o -name \*.$(A) -o -name \*.$(EXE) \) -exec $(RM) {} \;
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; }
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; }
326 $(ECHO) '1 ICON "$<"' > $@
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 $@
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 $@
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 \
394 $(if $(findstring $(OS),Win32),icons/q3map2.o,) \
396 libmathlib.$(A): CPPFLAGS_EXTRA := -Ilibs
398 libs/mathlib/bbox.o \
399 libs/mathlib/line.o \
400 libs/mathlib/m4x4.o \
401 libs/mathlib/mathlib.o \
404 libl_net.$(A): CPPFLAGS_EXTRA := -Ilibs
407 $(if $(findstring $(OS),Win32),libs/l_net/l_net_wins.o,libs/l_net/l_net_berkley.o) \
409 libjpeg6.$(A): CPPFLAGS_EXTRA := -Ilibs/jpeg6 -Ilibs
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 \
434 libpicomodel.$(A): CPPFLAGS_EXTRA := -Ilibs
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 \
460 libddslib.$(A): CPPFLAGS_EXTRA := -Ilibs
462 libs/ddslib/ddslib.o \
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 \
489 $(if $(findstring $(OS),Win32),icons/q3data.o,) \
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): \
496 radiant/brushmanip.o \
497 radiant/brushmodule.o \
498 radiant/brushnode.o \
500 radiant/brush_primit.o \
501 radiant/brushtokens.o \
504 radiant/camwindow.o \
505 radiant/clippertool.o \
510 radiant/eclass_def.o \
511 radiant/eclass_doom3.o \
512 radiant/eclass_fgd.o \
514 radiant/eclass_xml.o \
515 radiant/entityinspector.o \
516 radiant/entitylist.o \
518 radiant/environment.o \
521 radiant/filetypes.o \
523 radiant/findtexturedialog.o \
526 radiant/groupdialog.o \
531 radiant/mainframe.o \
534 $(if $(findstring $(OS),Win32),radiant/multimon.o,) \
536 radiant/nullmodel.o \
538 radiant/patchdialog.o \
539 radiant/patchmanip.o \
540 radiant/patchmodule.o \
542 radiant/pluginapi.o \
543 radiant/pluginmanager.o \
544 radiant/pluginmenu.o \
546 radiant/plugintoolbar.o \
548 radiant/preferencedictionary.o \
549 radiant/preferences.o \
552 radiant/referencecache.o \
554 radiant/renderstate.o \
555 radiant/scenegraph.o \
556 radiant/selection.o \
561 radiant/stacktrace.o \
562 radiant/surfacedialog.o \
565 radiant/texwindow.o \
567 radiant/treemodel.o \
573 radiant/windowobservers.o \
582 $(if $(findstring $(OS),Win32),icons/radiant.o,) \
584 libcmdlib.$(A): CPPFLAGS_EXTRA := -Ilibs
586 libs/cmdlib/cmdlib.o \
588 libprofile.$(A): CPPFLAGS_EXTRA := -Ilibs -Iinclude
590 libs/profile/file.o \
591 libs/profile/profile.o \
593 libgtkutil.$(A): CPPFLAGS_EXTRA := $(CPPFLAGS_GLIB) $(CPPFLAGS_GTK) $(CPPFLAGS_GTKGLEXT) -Ilibs -Iinclude
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 \
619 libxmllib.$(A): CPPFLAGS_EXTRA := $(CPPFLAGS_XML) $(CPPFLAGS_GLIB) -Ilibs -Iinclude
622 libs/xml/xmlelement.o \
623 libs/xml/xmlparser.o \
624 libs/xml/xmltextags.o \
625 libs/xml/xmlwriter.o \
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 \
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 \
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 \
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 \
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 \
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 \
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 \
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 \
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 \
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 \
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 \
722 $(INSTALLDIR)/modules/model.$(DLL): CPPFLAGS_EXTRA := -Ilibs -Iinclude
723 $(INSTALLDIR)/modules/model.$(DLL): \
724 plugins/model/model.o \
725 plugins/model/plugin.o \
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 \
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 \
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 \
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 \
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 \
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 \
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 \
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 \
823 $(if $(findstring $(OS),Win32),icons/qdata3.o,) \
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 \
861 $(if $(findstring $(OS),Win32),icons/q2map.o,) \
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 \
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 \
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 \
912 $(if $(findstring $(OS),Win32),icons/h2data.o,) \
915 install-data: binaries
916 $(MKDIR) $(INSTALLDIR)/games
917 $(FIND) $(INSTALLDIR)/ -name .svn -exec $(RM_R) {} \; -prune
919 for GAME in games/*; do \
920 if [ -d "$$GAME/tools" ]; then \
923 for GAMEFILE in $$GAME/games/*.game; do \
924 $(CP) "$$GAMEFILE" $(INSTALLDIR)/games/; \
926 for GAMEDIR in $$GAME/*.game; do \
927 $(CP_R) "$$GAMEDIR" $(INSTALLDIR)/; \
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
937 install-dll: binaries
938 MKDIR="$(MKDIR)" CP="$(CP)" CAT="$(CAT)" GTKDIR="$(GTKDIR)" WHICHDLL="$(WHICHDLL)" INSTALLDIR="$(INSTALLDIR)" $(SH) install-dlls.sh
940 install-dll: binaries
941 @$(ECHO) No DLL inclusion implemented for this target.
944 -include $(shell find . -name \*.d)