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 OTOOL ?= # only used on OS X
28 WINDRES ?= windres # only used on Win32
30 PKGCONFIG ?= pkg-config
42 TEE_STDERR ?= | tee /dev/stderr
49 SVNVERSION ?= svnversion
51 STDOUT_TO_DEVNULL ?= >/dev/null
52 STDERR_TO_DEVNULL ?= 2>/dev/null
53 STDERR_TO_STDOUT ?= 2>&1
54 TO_DEVNULL ?= $(STDOUT_TO_DEVNULL) $(STDERR_TO_STDOUT)
56 CPPFLAGS_GLIB ?= $(shell PKG_CONFIG_PATH=$(PKG_CONFIG_PATH) $(PKGCONFIG) glib-2.0 --cflags $(STDERR_TO_DEVNULL))
57 LIBS_GLIB ?= $(shell PKG_CONFIG_PATH=$(PKG_CONFIG_PATH) $(PKGCONFIG) glib-2.0 --libs-only-L $(STDERR_TO_DEVNULL)) \
58 $(shell PKG_CONFIG_PATH=$(PKG_CONFIG_PATH) $(PKGCONFIG) glib-2.0 --libs-only-l $(STDERR_TO_DEVNULL))
59 CPPFLAGS_XML ?= $(shell PKG_CONFIG_PATH=$(PKG_CONFIG_PATH) $(PKGCONFIG) libxml-2.0 --cflags $(STDERR_TO_DEVNULL))
60 LIBS_XML ?= $(shell PKG_CONFIG_PATH=$(PKG_CONFIG_PATH) $(PKGCONFIG) libxml-2.0 --libs-only-L $(STDERR_TO_DEVNULL)) \
61 $(shell PKG_CONFIG_PATH=$(PKG_CONFIG_PATH) $(PKGCONFIG) libxml-2.0 --libs-only-l $(STDERR_TO_DEVNULL))
62 CPPFLAGS_PNG ?= $(shell PKG_CONFIG_PATH=$(PKG_CONFIG_PATH) $(PKGCONFIG) libpng --cflags $(STDERR_TO_DEVNULL))
63 LIBS_PNG ?= $(shell PKG_CONFIG_PATH=$(PKG_CONFIG_PATH) $(PKGCONFIG) libpng --libs-only-L $(STDERR_TO_DEVNULL)) \
64 $(shell PKG_CONFIG_PATH=$(PKG_CONFIG_PATH) $(PKGCONFIG) libpng --libs-only-l $(STDERR_TO_DEVNULL))
65 CPPFLAGS_GTK ?= $(shell PKG_CONFIG_PATH=$(PKG_CONFIG_PATH) $(PKGCONFIG) gtk+-2.0 --cflags $(STDERR_TO_DEVNULL))
66 LIBS_GTK ?= $(shell PKG_CONFIG_PATH=$(PKG_CONFIG_PATH) $(PKGCONFIG) gtk+-2.0 --libs-only-L $(STDERR_TO_DEVNULL)) \
67 $(shell PKG_CONFIG_PATH=$(PKG_CONFIG_PATH) $(PKGCONFIG) gtk+-2.0 --libs-only-l $(STDERR_TO_DEVNULL))
68 CPPFLAGS_GTKGLEXT ?= $(shell PKG_CONFIG_PATH=$(PKG_CONFIG_PATH) $(PKGCONFIG) gtkglext-1.0 --cflags $(STDERR_TO_DEVNULL))
69 LIBS_GTKGLEXT ?= $(shell PKG_CONFIG_PATH=$(PKG_CONFIG_PATH) $(PKGCONFIG) gtkglext-1.0 --libs-only-L $(STDERR_TO_DEVNULL)) \
70 $(shell PKG_CONFIG_PATH=$(PKG_CONFIG_PATH) $(PKGCONFIG) gtkglext-1.0 --libs-only-l $(STDERR_TO_DEVNULL))
72 LIBS_GL ?= -lGL # -lopengl32 on Win32
74 LIBS_DL ?= -ldl # nothing on Win32
77 DEPEND_ON_MAKEFILE ?= yes
78 DEPENDENCIES_CHECK ?= quiet
81 # these are used on Win32 only
82 GTKDIR ?= $(shell PKG_CONFIG_PATH=$(PKG_CONFIG_PATH) $(PKGCONFIG) gtk+-2.0 --variable=prefix $(STDERR_TO_DEVNULL))
86 ifeq ($(OS),MINGW32_NT-6.0)
90 CFLAGS_COMMON = -MMD -W -Wall -Wcast-align -Wcast-qual -Wno-unused-parameter
94 CXXFLAGS_COMMON = -Wno-non-virtual-dtor -Wreorder -fno-exceptions -fno-rtti
97 ifeq ($(findstring $(CFLAGS),-g),)
99 # only add -g if no -g flag is in $(CFLAGS)
101 ifeq ($(findstring $(CFLAGS),-O),)
103 # only add -O if no -O flag is in $(CFLAGS)
109 ifeq ($(BUILD),extradebug)
110 ifeq ($(findstring $(CFLAGS),-g),)
112 # only add -g3 if no -g flag is in $(CFLAGS)
114 CPPFLAGS_COMMON += -D_DEBUG
118 ifeq ($(BUILD),profile)
119 ifeq ($(findstring $(CFLAGS),-g),)
121 # only add -g if no -g flag is in $(CFLAGS)
123 ifeq ($(findstring $(CFLAGS),-O),)
125 # only add -O if no -O flag is in $(CFLAGS)
129 LDFLAGS_COMMON += -pg
132 ifeq ($(BUILD),release)
133 ifeq ($(findstring $(CFLAGS),-O),)
135 # only add -O3 if no -O flag is in $(CFLAGS)
136 # to allow overriding the optimizations
142 $(error Unsupported build type: $(BUILD))
148 INSTALLDIR_BASE := $(INSTALLDIR)
151 CPPFLAGS_COMMON += -DPOSIX -DXWINDOWS
152 CFLAGS_COMMON += -fPIC
153 LDFLAGS_DLL = -fPIC -ldl
154 LIBS_COMMON = -lpthread
162 CPPFLAGS_COMMON += -DWIN32 -D_WIN32 -D_inline=inline
163 CFLAGS_COMMON += -mms-bitfields
164 LDFLAGS_DLL = --dll -Wl,--add-stdcall-alias
165 LIBS_COMMON = -lws2_32 -luser32 -lgdi32
171 # workaround: we have no "ldd" for Win32, so...
173 # workaround: OpenGL library for Win32 is called opengl32.dll
175 # workaround: no -ldl on Win32
180 CPPFLAGS_COMMON += -DPOSIX -DXWINDOWS
181 CFLAGS_COMMON += -fPIC
182 CXXFLAGS_COMMON += -fno-exceptions -fno-rtti
183 CPPFLAGS_COMMON += -I/sw/include -I/usr/X11R6/include
184 LDFLAGS_COMMON += -L/sw/lib -L/usr/lib -L/usr/X11R6/lib
185 LDFLAGS_DLL += -dynamiclib -ldl
191 # workaround for weird prints
192 ECHO_NOLF = /bin/echo -n
194 # workaround: http://developer.apple.com/qa/qa2007/qa1567.html
195 LIBS_GL += -lX11 -dylib_file /System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dylib:/System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dylib
196 LIBS_GTKGLEXT += -lX11 -dylib_file /System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dylib:/System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dylib
197 # workaround: we have no "ldd" for OS X, so...
201 INSTALLDIR := $(INSTALLDIR_BASE)/NetRadiant.app/Contents/MacOS/install
204 $(error Unsupported build OS: $(OS))
210 RADIANT_VERSION = 1.5.0n
211 RADIANT_MAJOR_VERSION = 5
212 RADIANT_MINOR_VERSION = 0
213 Q3MAP_VERSION = 2.5.17n
215 SVN_VERSION := $(shell $(SVNVERSION) -n $(STDERR_TO_DEVNULL) | $(SED) 's/M$$//g; s/.*://g;')
216 ifneq ($(SVN_VERSION),)
217 RADIANT_VERSION := $(RADIANT_VERSION)-svn$(SVN_VERSION)
218 Q3MAP_VERSION := $(Q3MAP_VERSION)-svn$(SVN_VERSION)
221 CPPFLAGS += -DRADIANT_VERSION="\"$(RADIANT_VERSION)\"" -DRADIANT_MAJOR_VERSION="\"$(RADIANT_MAJOR_VERSION)\"" -DRADIANT_MINOR_VERSION="\"$(RADIANT_MINOR_VERSION)\"" -DRADIANT_ABOUTMSG="\"$(RADIANT_ABOUTMSG)\"" -DQ3MAP_VERSION="\"$(Q3MAP_VERSION)\""
230 .PHONY: dependencies-check
231 ifeq ($(findstring $(DEPENDENCIES_CHECK),off),off)
233 @$(ECHO) dependencies checking disabled, good luck...
237 @if [ x"$(DEPENDENCIES_CHECK)" = x"verbose" ]; then set -x; fi; \
240 $(ECHO_NOLF) "Checking for $$2 ($$1)... "; \
241 $$2 --help $(TO_DEVNULL); \
242 if [ $$? != 127 ]; then \
245 $(ECHO) "not found, please install it or set PATH right!"; \
246 $(ECHO) "To see the failed commands, set DEPENDENCIES_CHECK=verbose"; \
247 $(ECHO) "To proceed anyway, set DEPENDENCIES_CHECK=off"; \
251 $(ECHO) checking that the build tools exist; \
252 checkbinary "bash (or another shell)" "$(SH)"; \
253 checkbinary coreutils "$(ECHO)"; \
254 checkbinary coreutils "$(ECHO_NOLF)"; \
255 checkbinary coreutils "$(CAT)"; \
256 checkbinary coreutils "$(MKDIR)"; \
257 checkbinary coreutils "$(CP)"; \
258 checkbinary coreutils "$(CP_R)"; \
259 checkbinary coreutils "$(RM)"; \
260 checkbinary coreutils "$(RM_R)"; \
261 checkbinary coreutils "$(ECHO) test $(TEE_STDERR)"; \
262 checkbinary sed "$(SED)"; \
263 checkbinary findutils "$(FIND)"; \
264 checkbinary diff "$(DIFF)"; \
265 checkbinary gcc "$(CC)"; \
266 checkbinary g++ "$(CXX)"; \
267 checkbinary binutils "$(RANLIB)"; \
268 checkbinary binutils "$(AR)"; \
269 checkbinary pkg-config "$(PKGCONFIG)"; \
270 [ "$(OS)" = "Win32" ] && checkbinary mingw32 "$(WINDRES)"; \
271 [ -n "$(LDD)" ] && checkbinary libc6 "$(LDD)"; \
272 [ -n "$(OTOOL)" ] && checkbinary xcode "$(OTOOL)"; \
273 $(ECHO) All required tools have been found!
275 @if [ x"$(DEPENDENCIES_CHECK)" = x"verbose" ]; then set -x; fi; \
278 $(ECHO_NOLF) "Checking for $$2 ($$1)... "; \
280 $(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) && \
281 $(CXX) conftest.o $(LDFLAGS) $(LDFLAGS_COMMON) $$5 $(LIBS_COMMON) $(LIBS) -o conftest $(TO_DEVNULL); \
283 $(RM) conftest conftest.o conftest.d; \
286 $(RM) conftest conftest.o conftest.d; \
287 $(ECHO) "not found, please install it or set PKG_CONFIG_PATH right!"; \
288 $(ECHO) "To see the failed commands, set DEPENDENCIES_CHECK=verbose"; \
289 $(ECHO) "To proceed anyway, set DEPENDENCIES_CHECK=off"; \
293 $(ECHO) checking that the dependencies exist; \
294 checkheader libglib2.0-dev glib/gutils.h g_path_is_absolute "$(CPPFLAGS_GLIB)" "$(LIBS_GLIB)"; \
295 checkheader libxml2-dev libxml/xpath.h xmlXPathInit "$(CPPFLAGS_XML)" "$(LIBS_XML)"; \
296 checkheader libpng12-dev png.h png_create_read_struct "$(CPPFLAGS_PNG)" "$(LIBS_PNG)"; \
297 checkheader "mesa-common-dev (or another OpenGL library)" GL/gl.h glClear "$(CPPFLAGS_GL)" "$(LIBS_GL)"; \
298 checkheader libgtk2.0-dev gtk/gtkdialog.h gtk_dialog_run "$(CPPFLAGS_GTK)" "$(LIBS_GTK)"; \
299 checkheader libgtkglext1-dev gtk/gtkglwidget.h gtk_widget_get_gl_context "$(CPPFLAGS_GTKGLEXT)" "$(LIBS_GTKGLEXT)"; \
300 [ "$(OS)" != "Win32" ] && checkheader libc6-dev dlfcn.h dlopen "$(CPPFLAGS_DL)" "$(LIBS_DL)"; \
301 checkheader zlib1g-dev zlib.h zlibVersion "$(CPPFLAGS_ZLIB)" "$(LIBS_ZLIB)"; \
302 $(ECHO) All required libraries have been found!
308 $(INSTALLDIR)/heretic2/h2data.$(EXE) \
309 $(INSTALLDIR)/modules/archivepak.$(DLL) \
310 $(INSTALLDIR)/modules/archivewad.$(DLL) \
311 $(INSTALLDIR)/modules/archivezip.$(DLL) \
312 $(INSTALLDIR)/modules/entity.$(DLL) \
313 $(INSTALLDIR)/modules/image.$(DLL) \
314 $(INSTALLDIR)/modules/imagehl.$(DLL) \
315 $(INSTALLDIR)/modules/imagepng.$(DLL) \
316 $(INSTALLDIR)/modules/imageq2.$(DLL) \
317 $(INSTALLDIR)/modules/mapq3.$(DLL) \
318 $(INSTALLDIR)/modules/mapxml.$(DLL) \
319 $(INSTALLDIR)/modules/md3model.$(DLL) \
320 $(INSTALLDIR)/modules/model.$(DLL) \
321 $(INSTALLDIR)/modules/shaders.$(DLL) \
322 $(INSTALLDIR)/modules/vfspk3.$(DLL) \
323 $(INSTALLDIR)/plugins/bobtoolz.$(DLL) \
324 $(INSTALLDIR)/plugins/brushexport.$(DLL) \
325 $(INSTALLDIR)/plugins/prtview.$(DLL) \
326 $(INSTALLDIR)/plugins/shaderplug.$(DLL) \
327 $(INSTALLDIR)/plugins/sunplug.$(DLL) \
328 $(INSTALLDIR)/plugins/ufoaiplug.$(DLL) \
329 $(INSTALLDIR)/q2map.$(EXE) \
330 $(INSTALLDIR)/q3data.$(EXE) \
331 $(INSTALLDIR)/q3map2.$(EXE) \
332 $(INSTALLDIR)/qdata3.$(EXE) \
333 $(INSTALLDIR)/radiant.$(EXE) \
337 $(RM_R) $(INSTALLDIR_BASE)/
338 $(FIND) . \( -name \*.o -o -name \*.d -o -name \*.$(DLL) -o -name \*.$(A) -o -name \*.$(EXE) \) -exec $(RM) {} \;
342 file=$@; $(MKDIR) $${file%/*}
343 $(CXX) $^ $(LDFLAGS) $(LDFLAGS_COMMON) $(LDFLAGS_EXTRA) $(LIBS_EXTRA) $(LIBS_COMMON) $(LIBS) -o $@
344 [ -z "$(LDD)" ] || [ -z "`$(LDD) -r $@ $(STDERR_TO_STDOUT) $(STDOUT_TO_DEVNULL) $(TEE_STDERR)`" ] || { $(RM) $@; exit 1; }
351 file=$@; $(MKDIR) $${file%/*}
352 $(CXX) $^ $(LDFLAGS) $(LDFLAGS_COMMON) $(LDFLAGS_EXTRA) $(LDFLAGS_DLL) $(LIBS_EXTRA) $(LIBS_COMMON) $(LIBS) -shared -o $@
353 [ -z "$(LDD)" ] || [ -z "`$(LDD) -r $@ $(STDERR_TO_STDOUT) $(STDOUT_TO_DEVNULL) $(TEE_STDERR)`" ] || { $(RM) $@; exit 1; }
356 $(ECHO) '1 ICON "$<"' > $@
363 %.o: %.cpp $(if $(findstring $(DEPEND_ON_MAKEFILE),yes),$(wildcard Makefile*),)
364 $(CXX) $< $(CFLAGS) $(CXXFLAGS) $(CFLAGS_COMMON) $(CXXFLAGS_COMMON) $(CPPFLAGS_EXTRA) $(CPPFLAGS_COMMON) $(CPPFLAGS) $(TARGET_ARCH) -c -o $@
366 %.o: %.c $(if $(findstring $(DEPEND_ON_MAKEFILE),yes),$(wildcard Makefile*),)
367 $(CC) $< $(CFLAGS) $(CFLAGS_COMMON) $(CPPFLAGS_EXTRA) $(CPPFLAGS_COMMON) $(CPPFLAGS) $(TARGET_ARCH) -c -o $@
369 $(INSTALLDIR)/q3map2.$(EXE): LIBS_EXTRA := $(LIBS_XML) $(LIBS_GLIB) $(LIBS_PNG) $(LIBS_ZLIB)
370 $(INSTALLDIR)/q3map2.$(EXE): CPPFLAGS_EXTRA := $(CPPFLAGS_XML) $(CPPFLAGS_GLIB) $(CPPFLAGS_PNG) -Itools/quake3/common -Ilibs -Iinclude
371 $(INSTALLDIR)/q3map2.$(EXE): \
372 tools/quake3/common/cmdlib.o \
373 tools/quake3/common/imagelib.o \
374 tools/quake3/common/inout.o \
375 tools/quake3/common/md4.o \
376 tools/quake3/common/mutex.o \
377 tools/quake3/common/polylib.o \
378 tools/quake3/common/scriplib.o \
379 tools/quake3/common/threads.o \
380 tools/quake3/common/unzip.o \
381 tools/quake3/common/vfs.o \
382 tools/quake3/q3map2/brush.o \
383 tools/quake3/q3map2/brush_primit.o \
384 tools/quake3/q3map2/bspfile_abstract.o \
385 tools/quake3/q3map2/bspfile_ibsp.o \
386 tools/quake3/q3map2/bspfile_rbsp.o \
387 tools/quake3/q3map2/bsp.o \
388 tools/quake3/q3map2/convert_ase.o \
389 tools/quake3/q3map2/convert_map.o \
390 tools/quake3/q3map2/decals.o \
391 tools/quake3/q3map2/facebsp.o \
392 tools/quake3/q3map2/fog.o \
393 tools/quake3/q3map2/image.o \
394 tools/quake3/q3map2/leakfile.o \
395 tools/quake3/q3map2/light_bounce.o \
396 tools/quake3/q3map2/lightmaps_ydnar.o \
397 tools/quake3/q3map2/light.o \
398 tools/quake3/q3map2/light_trace.o \
399 tools/quake3/q3map2/light_ydnar.o \
400 tools/quake3/q3map2/main.o \
401 tools/quake3/q3map2/map.o \
402 tools/quake3/q3map2/mesh.o \
403 tools/quake3/q3map2/model.o \
404 tools/quake3/q3map2/patch.o \
405 tools/quake3/q3map2/path_init.o \
406 tools/quake3/q3map2/portals.o \
407 tools/quake3/q3map2/prtfile.o \
408 tools/quake3/q3map2/shaders.o \
409 tools/quake3/q3map2/surface_extra.o \
410 tools/quake3/q3map2/surface_foliage.o \
411 tools/quake3/q3map2/surface_fur.o \
412 tools/quake3/q3map2/surface_meta.o \
413 tools/quake3/q3map2/surface.o \
414 tools/quake3/q3map2/tjunction.o \
415 tools/quake3/q3map2/tree.o \
416 tools/quake3/q3map2/visflow.o \
417 tools/quake3/q3map2/vis.o \
418 tools/quake3/q3map2/writebsp.o \
424 $(if $(findstring $(OS),Win32),icons/q3map2.o,) \
426 libmathlib.$(A): CPPFLAGS_EXTRA := -Ilibs
428 libs/mathlib/bbox.o \
429 libs/mathlib/line.o \
430 libs/mathlib/m4x4.o \
431 libs/mathlib/mathlib.o \
434 libl_net.$(A): CPPFLAGS_EXTRA := -Ilibs
437 $(if $(findstring $(OS),Win32),libs/l_net/l_net_wins.o,libs/l_net/l_net_berkley.o) \
439 libjpeg6.$(A): CPPFLAGS_EXTRA := -Ilibs/jpeg6 -Ilibs
441 libs/jpeg6/jcomapi.o \
442 libs/jpeg6/jdapimin.o \
443 libs/jpeg6/jdapistd.o \
444 libs/jpeg6/jdatasrc.o \
445 libs/jpeg6/jdcoefct.o \
446 libs/jpeg6/jdcolor.o \
447 libs/jpeg6/jddctmgr.o \
448 libs/jpeg6/jdhuff.o \
449 libs/jpeg6/jdinput.o \
450 libs/jpeg6/jdmainct.o \
451 libs/jpeg6/jdmarker.o \
452 libs/jpeg6/jdmaster.o \
453 libs/jpeg6/jdpostct.o \
454 libs/jpeg6/jdsample.o \
455 libs/jpeg6/jdtrans.o \
456 libs/jpeg6/jerror.o \
457 libs/jpeg6/jfdctflt.o \
458 libs/jpeg6/jidctflt.o \
459 libs/jpeg6/jmemmgr.o \
460 libs/jpeg6/jmemnobs.o \
461 libs/jpeg6/jpgload.o \
462 libs/jpeg6/jutils.o \
464 libpicomodel.$(A): CPPFLAGS_EXTRA := -Ilibs
466 libs/picomodel/lwo/clip.o \
467 libs/picomodel/lwo/envelope.o \
468 libs/picomodel/lwo/list.o \
469 libs/picomodel/lwo/lwio.o \
470 libs/picomodel/lwo/lwo2.o \
471 libs/picomodel/lwo/lwob.o \
472 libs/picomodel/lwo/pntspols.o \
473 libs/picomodel/lwo/surface.o \
474 libs/picomodel/lwo/vecmath.o \
475 libs/picomodel/lwo/vmap.o \
476 libs/picomodel/picointernal.o \
477 libs/picomodel/picomodel.o \
478 libs/picomodel/picomodules.o \
479 libs/picomodel/pm_3ds.o \
480 libs/picomodel/pm_ase.o \
481 libs/picomodel/pm_fm.o \
482 libs/picomodel/pm_lwo.o \
483 libs/picomodel/pm_md2.o \
484 libs/picomodel/pm_md3.o \
485 libs/picomodel/pm_mdc.o \
486 libs/picomodel/pm_ms3d.o \
487 libs/picomodel/pm_obj.o \
488 libs/picomodel/pm_terrain.o \
490 libddslib.$(A): CPPFLAGS_EXTRA := -Ilibs
492 libs/ddslib/ddslib.o \
494 $(INSTALLDIR)/q3data.$(EXE): LIBS_EXTRA := $(LIBS_XML) $(LIBS_GLIB) $(LIBS_ZLIB)
495 $(INSTALLDIR)/q3data.$(EXE): CPPFLAGS_EXTRA := $(CPPFLAGS_XML) $(CPPFLAGS_GLIB) $(CPPFLAGS_ZLIB) -Itools/quake3/common -Ilibs -Iinclude
496 $(INSTALLDIR)/q3data.$(EXE): \
497 tools/quake3/common/aselib.o \
498 tools/quake3/common/bspfile.o \
499 tools/quake3/common/cmdlib.o \
500 tools/quake3/common/imagelib.o \
501 tools/quake3/common/inout.o \
502 tools/quake3/common/md4.o \
503 tools/quake3/common/scriplib.o \
504 tools/quake3/common/trilib.o \
505 tools/quake3/common/unzip.o \
506 tools/quake3/common/vfs.o \
507 tools/quake3/q3data/3dslib.o \
508 tools/quake3/q3data/compress.o \
509 tools/quake3/q3data/images.o \
510 tools/quake3/q3data/md3lib.o \
511 tools/quake3/q3data/models.o \
512 tools/quake3/q3data/p3dlib.o \
513 tools/quake3/q3data/polyset.o \
514 tools/quake3/q3data/q3data.o \
515 tools/quake3/q3data/stripper.o \
516 tools/quake3/q3data/video.o \
519 $(if $(findstring $(OS),Win32),icons/q3data.o,) \
521 $(INSTALLDIR)/radiant.$(EXE): LDFLAGS_EXTRA := $(MWINDOWS)
522 $(INSTALLDIR)/radiant.$(EXE): LIBS_EXTRA := $(LIBS_GL) $(LIBS_DL) $(LIBS_XML) $(LIBS_GLIB) $(LIBS_GTK) $(LIBS_GTKGLEXT) $(LIBS_ZLIB)
523 $(INSTALLDIR)/radiant.$(EXE): CPPFLAGS_EXTRA := $(CPPFLAGS_GL) $(CPPFLAGS_DL) $(CPPFLAGS_XML) $(CPPFLAGS_GLIB) $(CPPFLAGS_GTK) $(CPPFLAGS_GTKGLEXT) -Ilibs -Iinclude
524 $(INSTALLDIR)/radiant.$(EXE): \
526 radiant/brushmanip.o \
527 radiant/brushmodule.o \
528 radiant/brushnode.o \
530 radiant/brush_primit.o \
531 radiant/brushtokens.o \
534 radiant/camwindow.o \
535 radiant/clippertool.o \
540 radiant/eclass_def.o \
541 radiant/eclass_doom3.o \
542 radiant/eclass_fgd.o \
544 radiant/eclass_xml.o \
545 radiant/entityinspector.o \
546 radiant/entitylist.o \
548 radiant/environment.o \
551 radiant/filetypes.o \
553 radiant/findtexturedialog.o \
556 radiant/groupdialog.o \
561 radiant/mainframe.o \
564 $(if $(findstring $(OS),Win32),radiant/multimon.o,) \
566 radiant/nullmodel.o \
568 radiant/patchdialog.o \
569 radiant/patchmanip.o \
570 radiant/patchmodule.o \
572 radiant/pluginapi.o \
573 radiant/pluginmanager.o \
574 radiant/pluginmenu.o \
576 radiant/plugintoolbar.o \
578 radiant/preferencedictionary.o \
579 radiant/preferences.o \
582 radiant/referencecache.o \
584 radiant/renderstate.o \
585 radiant/scenegraph.o \
586 radiant/selection.o \
591 radiant/stacktrace.o \
592 radiant/surfacedialog.o \
595 radiant/texwindow.o \
597 radiant/treemodel.o \
603 radiant/windowobservers.o \
612 $(if $(findstring $(OS),Win32),icons/radiant.o,) \
614 libcmdlib.$(A): CPPFLAGS_EXTRA := -Ilibs
616 libs/cmdlib/cmdlib.o \
618 libprofile.$(A): CPPFLAGS_EXTRA := -Ilibs -Iinclude
620 libs/profile/file.o \
621 libs/profile/profile.o \
623 libgtkutil.$(A): CPPFLAGS_EXTRA := $(CPPFLAGS_GLIB) $(CPPFLAGS_GTK) $(CPPFLAGS_GTKGLEXT) -Ilibs -Iinclude
625 libs/gtkutil/accelerator.o \
626 libs/gtkutil/button.o \
627 libs/gtkutil/clipboard.o \
628 libs/gtkutil/closure.o \
629 libs/gtkutil/container.o \
630 libs/gtkutil/cursor.o \
631 libs/gtkutil/dialog.o \
632 libs/gtkutil/entry.o \
633 libs/gtkutil/filechooser.o \
634 libs/gtkutil/frame.o \
635 libs/gtkutil/glfont.o \
636 libs/gtkutil/glwidget.o \
637 libs/gtkutil/idledraw.o \
638 libs/gtkutil/image.o \
639 libs/gtkutil/menu.o \
640 libs/gtkutil/messagebox.o \
641 libs/gtkutil/nonmodal.o \
642 libs/gtkutil/paned.o \
643 libs/gtkutil/pointer.o \
644 libs/gtkutil/toolbar.o \
645 libs/gtkutil/widget.o \
646 libs/gtkutil/window.o \
647 libs/gtkutil/xorrectangle.o \
649 libxmllib.$(A): CPPFLAGS_EXTRA := $(CPPFLAGS_XML) $(CPPFLAGS_GLIB) -Ilibs -Iinclude
652 libs/xml/xmlelement.o \
653 libs/xml/xmlparser.o \
654 libs/xml/xmltextags.o \
655 libs/xml/xmlwriter.o \
657 $(INSTALLDIR)/modules/archivezip.$(DLL): LIBS_EXTRA := $(LIBS_ZLIB)
658 $(INSTALLDIR)/modules/archivezip.$(DLL): CPPFLAGS_EXTRA := $(CPPFLAGS_ZLIB) -Ilibs -Iinclude
659 $(INSTALLDIR)/modules/archivezip.$(DLL): \
660 plugins/archivezip/archive.o \
661 plugins/archivezip/pkzip.o \
662 plugins/archivezip/plugin.o \
663 plugins/archivezip/zlibstream.o \
665 $(INSTALLDIR)/modules/archivewad.$(DLL): CPPFLAGS_EXTRA := -Ilibs -Iinclude
666 $(INSTALLDIR)/modules/archivewad.$(DLL): \
667 plugins/archivewad/archive.o \
668 plugins/archivewad/plugin.o \
669 plugins/archivewad/wad.o \
671 $(INSTALLDIR)/modules/archivepak.$(DLL): CPPFLAGS_EXTRA := -Ilibs -Iinclude
672 $(INSTALLDIR)/modules/archivepak.$(DLL): \
673 plugins/archivepak/archive.o \
674 plugins/archivepak/pak.o \
675 plugins/archivepak/plugin.o \
677 $(INSTALLDIR)/modules/entity.$(DLL): CPPFLAGS_EXTRA := -Ilibs -Iinclude
678 $(INSTALLDIR)/modules/entity.$(DLL): \
679 plugins/entity/angle.o \
680 plugins/entity/angles.o \
681 plugins/entity/colour.o \
682 plugins/entity/doom3group.o \
683 plugins/entity/eclassmodel.o \
684 plugins/entity/entity.o \
685 plugins/entity/filters.o \
686 plugins/entity/generic.o \
687 plugins/entity/group.o \
688 plugins/entity/light.o \
689 plugins/entity/miscmodel.o \
690 plugins/entity/model.o \
691 plugins/entity/modelskinkey.o \
692 plugins/entity/namedentity.o \
693 plugins/entity/origin.o \
694 plugins/entity/plugin.o \
695 plugins/entity/rotation.o \
696 plugins/entity/scale.o \
697 plugins/entity/skincache.o \
698 plugins/entity/targetable.o \
700 $(INSTALLDIR)/modules/image.$(DLL): CPPFLAGS_EXTRA := -Ilibs -Iinclude
701 $(INSTALLDIR)/modules/image.$(DLL): \
702 plugins/image/bmp.o \
703 plugins/image/dds.o \
704 plugins/image/image.o \
705 plugins/image/jpeg.o \
706 plugins/image/pcx.o \
707 plugins/image/tga.o \
711 $(INSTALLDIR)/modules/imageq2.$(DLL): CPPFLAGS_EXTRA := -Ilibs -Iinclude
712 $(INSTALLDIR)/modules/imageq2.$(DLL): \
713 plugins/imageq2/imageq2.o \
714 plugins/imageq2/wal32.o \
715 plugins/imageq2/wal.o \
717 $(INSTALLDIR)/modules/imagehl.$(DLL): CPPFLAGS_EXTRA := -Ilibs -Iinclude
718 $(INSTALLDIR)/modules/imagehl.$(DLL): \
719 plugins/imagehl/hlw.o \
720 plugins/imagehl/imagehl.o \
721 plugins/imagehl/mip.o \
722 plugins/imagehl/sprite.o \
724 $(INSTALLDIR)/modules/imagepng.$(DLL): LIBS_EXTRA := $(LIBS_PNG)
725 $(INSTALLDIR)/modules/imagepng.$(DLL): CPPFLAGS_EXTRA := $(CPPFLAGS_PNG) -Ilibs -Iinclude
726 $(INSTALLDIR)/modules/imagepng.$(DLL): \
727 plugins/imagepng/plugin.o \
729 $(INSTALLDIR)/modules/mapq3.$(DLL): CPPFLAGS_EXTRA := -Ilibs -Iinclude
730 $(INSTALLDIR)/modules/mapq3.$(DLL): \
731 plugins/mapq3/parse.o \
732 plugins/mapq3/plugin.o \
733 plugins/mapq3/write.o \
735 $(INSTALLDIR)/modules/mapxml.$(DLL): LIBS_EXTRA := $(LIBS_XML) $(LIBS_GLIB)
736 $(INSTALLDIR)/modules/mapxml.$(DLL): CPPFLAGS_EXTRA := $(CPPFLAGS_XML) $(CPPFLAGS_GLIB) -Ilibs -Iinclude
737 $(INSTALLDIR)/modules/mapxml.$(DLL): \
738 plugins/mapxml/plugin.o \
739 plugins/mapxml/xmlparse.o \
740 plugins/mapxml/xmlwrite.o \
742 $(INSTALLDIR)/modules/md3model.$(DLL): CPPFLAGS_EXTRA := -Ilibs -Iinclude
743 $(INSTALLDIR)/modules/md3model.$(DLL): \
744 plugins/md3model/md2.o \
745 plugins/md3model/md3.o \
746 plugins/md3model/md5.o \
747 plugins/md3model/mdc.o \
748 plugins/md3model/mdlimage.o \
749 plugins/md3model/mdl.o \
750 plugins/md3model/plugin.o \
752 $(INSTALLDIR)/modules/model.$(DLL): CPPFLAGS_EXTRA := -Ilibs -Iinclude
753 $(INSTALLDIR)/modules/model.$(DLL): \
754 plugins/model/model.o \
755 plugins/model/plugin.o \
758 $(INSTALLDIR)/modules/shaders.$(DLL): LIBS_EXTRA := $(LIBS_GLIB)
759 $(INSTALLDIR)/modules/shaders.$(DLL): CPPFLAGS_EXTRA := $(CPPFLAGS_GLIB) -Ilibs -Iinclude
760 $(INSTALLDIR)/modules/shaders.$(DLL): \
761 plugins/shaders/plugin.o \
762 plugins/shaders/shaders.o \
764 $(INSTALLDIR)/modules/vfspk3.$(DLL): LIBS_EXTRA := $(LIBS_GLIB)
765 $(INSTALLDIR)/modules/vfspk3.$(DLL): CPPFLAGS_EXTRA := $(CPPFLAGS_GLIB) -Ilibs -Iinclude
766 $(INSTALLDIR)/modules/vfspk3.$(DLL): \
767 plugins/vfspk3/archive.o \
768 plugins/vfspk3/vfs.o \
769 plugins/vfspk3/vfspk3.o \
771 $(INSTALLDIR)/plugins/bobtoolz.$(DLL): LIBS_EXTRA := $(LIBS_GLIB) $(LIBS_GTK)
772 $(INSTALLDIR)/plugins/bobtoolz.$(DLL): CPPFLAGS_EXTRA := $(CPPFLAGS_GLIB) $(CPPFLAGS_GTK) -Ilibs -Iinclude
773 $(INSTALLDIR)/plugins/bobtoolz.$(DLL): \
774 contrib/bobtoolz/bobToolz-GTK.o \
775 contrib/bobtoolz/bsploader.o \
776 contrib/bobtoolz/cportals.o \
777 contrib/bobtoolz/DBobView.o \
778 contrib/bobtoolz/DBrush.o \
779 contrib/bobtoolz/DEntity.o \
780 contrib/bobtoolz/DEPair.o \
781 contrib/bobtoolz/dialogs/dialogs-gtk.o \
782 contrib/bobtoolz/DMap.o \
783 contrib/bobtoolz/DPatch.o \
784 contrib/bobtoolz/DPlane.o \
785 contrib/bobtoolz/DPoint.o \
786 contrib/bobtoolz/DShape.o \
787 contrib/bobtoolz/DTrainDrawer.o \
788 contrib/bobtoolz/DTreePlanter.o \
789 contrib/bobtoolz/DVisDrawer.o \
790 contrib/bobtoolz/DWinding.o \
791 contrib/bobtoolz/funchandlers-GTK.o \
792 contrib/bobtoolz/lists.o \
793 contrib/bobtoolz/misc.o \
794 contrib/bobtoolz/ScriptParser.o \
795 contrib/bobtoolz/shapes.o \
796 contrib/bobtoolz/visfind.o \
801 $(INSTALLDIR)/plugins/brushexport.$(DLL): LIBS_EXTRA := $(LIBS_GLIB) $(LIBS_GTK)
802 $(INSTALLDIR)/plugins/brushexport.$(DLL): CPPFLAGS_EXTRA := $(CPPFLAGS_GLIB) $(CPPFLAGS_GTK) -Ilibs -Iinclude
803 $(INSTALLDIR)/plugins/brushexport.$(DLL): \
804 contrib/brushexport/callbacks.o \
805 contrib/brushexport/export.o \
806 contrib/brushexport/interface.o \
807 contrib/brushexport/plugin.o \
808 contrib/brushexport/support.o \
810 $(INSTALLDIR)/plugins/prtview.$(DLL): LIBS_EXTRA := $(LIBS_GLIB) $(LIBS_GTK)
811 $(INSTALLDIR)/plugins/prtview.$(DLL): CPPFLAGS_EXTRA := $(CPPFLAGS_GLIB) $(CPPFLAGS_GTK) -Ilibs -Iinclude
812 $(INSTALLDIR)/plugins/prtview.$(DLL): \
813 contrib/prtview/AboutDialog.o \
814 contrib/prtview/ConfigDialog.o \
815 contrib/prtview/LoadPortalFileDialog.o \
816 contrib/prtview/portals.o \
817 contrib/prtview/prtview.o \
820 $(INSTALLDIR)/plugins/shaderplug.$(DLL): LIBS_EXTRA := $(LIBS_GLIB) $(LIBS_GTK) $(LIBS_XML)
821 $(INSTALLDIR)/plugins/shaderplug.$(DLL): CPPFLAGS_EXTRA := $(CPPFLAGS_GLIB) $(CPPFLAGS_GTK) $(CPPFLAGS_XML) -Ilibs -Iinclude
822 $(INSTALLDIR)/plugins/shaderplug.$(DLL): \
823 contrib/shaderplug/shaderplug.o \
826 $(INSTALLDIR)/plugins/sunplug.$(DLL): LIBS_EXTRA := $(LIBS_GLIB) $(LIBS_GTK)
827 $(INSTALLDIR)/plugins/sunplug.$(DLL): CPPFLAGS_EXTRA := $(CPPFLAGS_GLIB) $(CPPFLAGS_GTK) -Ilibs -Iinclude
828 $(INSTALLDIR)/plugins/sunplug.$(DLL): \
829 contrib/sunplug/sunplug.o \
831 $(INSTALLDIR)/qdata3.$(EXE): LIBS_EXTRA := $(LIBS_XML)
832 $(INSTALLDIR)/qdata3.$(EXE): CPPFLAGS_EXTRA := $(CPPFLAGS_XML) -Itools/quake2/common -Ilibs -Iinclude
833 $(INSTALLDIR)/qdata3.$(EXE): \
834 tools/quake2/common/bspfile.o \
835 tools/quake2/common/cmdlib.o \
836 tools/quake2/common/inout.o \
837 tools/quake2/common/l3dslib.o \
838 tools/quake2/common/lbmlib.o \
839 tools/quake2/common/mathlib.o \
840 tools/quake2/common/md4.o \
841 tools/quake2/common/path_init.o \
842 tools/quake2/common/polylib.o \
843 tools/quake2/common/scriplib.o \
844 tools/quake2/common/threads.o \
845 tools/quake2/common/trilib.o \
846 tools/quake2/qdata/images.o \
847 tools/quake2/qdata/models.o \
848 tools/quake2/qdata/qdata.o \
849 tools/quake2/qdata/sprites.o \
850 tools/quake2/qdata/tables.o \
851 tools/quake2/qdata/video.o \
853 $(if $(findstring $(OS),Win32),icons/qdata3.o,) \
855 $(INSTALLDIR)/q2map.$(EXE): LIBS_EXTRA := $(LIBS_XML)
856 $(INSTALLDIR)/q2map.$(EXE): CPPFLAGS_EXTRA := $(CPPFLAGS_XML) -Itools/quake2/common -Ilibs -Iinclude
857 $(INSTALLDIR)/q2map.$(EXE): \
858 tools/quake2/common/bspfile.o \
859 tools/quake2/common/cmdlib.o \
860 tools/quake2/common/inout.o \
861 tools/quake2/common/l3dslib.o \
862 tools/quake2/common/lbmlib.o \
863 tools/quake2/common/mathlib.o \
864 tools/quake2/common/md4.o \
865 tools/quake2/common/path_init.o \
866 tools/quake2/common/polylib.o \
867 tools/quake2/common/scriplib.o \
868 tools/quake2/common/threads.o \
869 tools/quake2/common/trilib.o \
870 tools/quake2/q2map/brushbsp.o \
871 tools/quake2/q2map/csg.o \
872 tools/quake2/q2map/faces.o \
873 tools/quake2/q2map/flow.o \
874 tools/quake2/q2map/glfile.o \
875 tools/quake2/q2map/leakfile.o \
876 tools/quake2/q2map/lightmap.o \
877 tools/quake2/q2map/main.o \
878 tools/quake2/q2map/map.o \
879 tools/quake2/q2map/nodraw.o \
880 tools/quake2/q2map/patches.o \
881 tools/quake2/q2map/portals.o \
882 tools/quake2/q2map/prtfile.o \
883 tools/quake2/q2map/qbsp.o \
884 tools/quake2/q2map/qrad.o \
885 tools/quake2/q2map/qvis.o \
886 tools/quake2/q2map/textures.o \
887 tools/quake2/q2map/trace.o \
888 tools/quake2/q2map/tree.o \
889 tools/quake2/q2map/writebsp.o \
891 $(if $(findstring $(OS),Win32),icons/q2map.o,) \
893 $(INSTALLDIR)/plugins/ufoaiplug.$(DLL): LIBS_EXTRA := $(LIBS_GLIB) $(LIBS_GTK)
894 $(INSTALLDIR)/plugins/ufoaiplug.$(DLL): CPPFLAGS_EXTRA := $(CPPFLAGS_GLIB) $(CPPFLAGS_GTK) -Ilibs -Iinclude
895 $(INSTALLDIR)/plugins/ufoaiplug.$(DLL): \
896 contrib/ufoaiplug/ufoai_filters.o \
897 contrib/ufoaiplug/ufoai_gtk.o \
898 contrib/ufoaiplug/ufoai_level.o \
899 contrib/ufoaiplug/ufoai.o \
901 #$(INSTALLDIR)/plugins/bkgrnd2d.$(DLL): LIBS_EXTRA := $(LIBS_GLIB) $(LIBS_GTK)
902 #$(INSTALLDIR)/plugins/bkgrnd2d.$(DLL): CPPFLAGS_EXTRA := $(CPPFLAGS_GLIB) $(CPPFLAGS_GTK) -Ilibs -Iinclude
903 #$(INSTALLDIR)/plugins/bkgrnd2d.$(DLL): \
904 # contrib/bkgrnd2d/bkgrnd2d.o \
905 # contrib/bkgrnd2d/dialog.o \
906 # contrib/bkgrnd2d/plugin.o \
908 $(INSTALLDIR)/heretic2/h2data.$(EXE): LIBS_EXTRA := $(LIBS_XML)
909 $(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
910 $(INSTALLDIR)/heretic2/h2data.$(EXE): \
911 tools/quake2/qdata_heretic2/common/bspfile.o \
912 tools/quake2/qdata_heretic2/common/cmdlib.o \
913 tools/quake2/qdata_heretic2/common/inout.o \
914 tools/quake2/qdata_heretic2/common/l3dslib.o \
915 tools/quake2/qdata_heretic2/common/lbmlib.o \
916 tools/quake2/qdata_heretic2/common/mathlib.o \
917 tools/quake2/qdata_heretic2/common/md4.o \
918 tools/quake2/qdata_heretic2/common/path_init.o \
919 tools/quake2/qdata_heretic2/common/qfiles.o \
920 tools/quake2/qdata_heretic2/common/scriplib.o \
921 tools/quake2/qdata_heretic2/common/threads.o \
922 tools/quake2/qdata_heretic2/common/token.o \
923 tools/quake2/qdata_heretic2/common/trilib.o \
924 tools/quake2/qdata_heretic2/qcommon/reference.o \
925 tools/quake2/qdata_heretic2/qcommon/resourcemanager.o \
926 tools/quake2/qdata_heretic2/qcommon/skeletons.o \
927 tools/quake2/qdata_heretic2/animcomp.o \
928 tools/quake2/qdata_heretic2/book.o \
929 tools/quake2/qdata_heretic2/fmodels.o \
930 tools/quake2/qdata_heretic2/images.o \
931 tools/quake2/qdata_heretic2/jointed.o \
932 tools/quake2/qdata_heretic2/models.o \
933 tools/quake2/qdata_heretic2/pics.o \
934 tools/quake2/qdata_heretic2/qdata.o \
935 tools/quake2/qdata_heretic2/qd_skeletons.o \
936 tools/quake2/qdata_heretic2/sprites.o \
937 tools/quake2/qdata_heretic2/svdcmp.o \
938 tools/quake2/qdata_heretic2/tables.o \
939 tools/quake2/qdata_heretic2/tmix.o \
940 tools/quake2/qdata_heretic2/video.o \
942 $(if $(findstring $(OS),Win32),icons/h2data.o,) \
945 install-data: binaries
946 $(MKDIR) $(INSTALLDIR)/games
947 $(FIND) $(INSTALLDIR_BASE)/ -name .svn -exec $(RM_R) {} \; -prune
948 [ "$(OS)" != "Darwin" ] || $(CP_R) setup/data/osx/NetRadiant.app/* $(INSTALLDIR_BASE)/NetRadiant.app/
950 for GAME in games/*; do \
951 if [ -d "$$GAME/tools" ]; then \
954 for GAMEFILE in $$GAME/games/*.game; do \
955 $(CP) "$$GAMEFILE" $(INSTALLDIR)/games/; \
957 for GAMEDIR in $$GAME/*.game; do \
958 $(CP_R) "$$GAMEDIR" $(INSTALLDIR)/; \
961 $(ECHO) $(RADIANT_MINOR_VERSION) > $(INSTALLDIR)/RADIANT_MINOR
962 $(ECHO) $(RADIANT_MAJOR_VERSION) > $(INSTALLDIR)/RADIANT_MAJOR
963 $(CP_R) setup/data/tools/* $(INSTALLDIR)/
964 $(FIND) $(INSTALLDIR_BASE)/ -name .svn -exec $(RM_R) {} \; -prune
968 install-dll: binaries
969 MKDIR="$(MKDIR)" CP="$(CP)" CAT="$(CAT)" GTKDIR="$(GTKDIR)" WHICHDLL="$(WHICHDLL)" INSTALLDIR="$(INSTALLDIR)" $(SH) install-dlls.sh
972 install-dll: binaries
973 CP="$(CP)" OTOOL="$(OTOOL)" INSTALLDIR="$(INSTALLDIR)" $(SH) install-dylibs.sh
975 install-dll: binaries
976 @$(ECHO) No DLL inclusion implemented for this target.
980 -include $(shell find . -name \*.d)