now added all plugins that make sense for Q3 maps
[divverent/netradiant.git] / Makefile
1 CFLAGS = -W -Wall -Wcast-align -Wcast-qual -Wno-unused-parameter -g3 -fPIC
2 CXXFLAGS = $(CFLAGS) -Wno-non-virtual-dtor -Wreorder -fno-exceptions -fno-rtti
3 CPPFLAGS_COMMON = -DPOSIX -DXWINDOWS -D_DEBUG -D_LINUX
4 LDFLAGS_COMMON = 
5 LDFLAGS_DLL = -fPIC -Wl,-fini,fini_stub -static-libgcc -ldl
6
7 EXE = x86
8 A = a
9 DLL = so
10 NETAPI = berkley
11
12 RADIANT_ABOUTMSG = Custom build
13
14 LDD ?= ldd
15 FIND ?= find
16 RANLIB ?= ranlib
17 AR ?= ar
18 MKDIR ?= mkdir -p
19 CP ?= cp
20 CP_R ?= $(CP) -r
21 RM_R ?= $(RM) -r
22
23 TEE_STDERR ?= | tee /dev/stderr
24
25 CPPFLAGS_GLIB = `pkg-config glib-2.0 --cflags`
26 LIBS_GLIB = `pkg-config glib-2.0 --libs`
27
28 CPPFLAGS_XML = `xml2-config --cflags`
29 LIBS_XML = `xml2-config --libs`
30
31 CPPFLAGS_PNG = `libpng-config --cflags`
32 LIBS_PNG = `libpng-config --libs`
33
34 CPPFLAGS_GTK = `pkg-config gtk+-2.0 --cflags`
35 LIBS_GTK = `pkg-config gtk+-2.0 --libs`
36
37 CPPFLAGS_GTKGLEXT = `pkg-config gtkglext-1.0 --cflags`
38 LIBS_GTKGLEXT = `pkg-config gtkglext-1.0 --libs`
39
40 LDFLAGS := $(LDFLAGS_COMMON)
41
42 # from qe3.cpp: const char* const EXECUTABLE_TYPE = 
43 # from qe3.cpp: #if defined(__linux__) || defined (__FreeBSD__)
44 # from qe3.cpp: "x86"
45 # from qe3.cpp: #elif defined(__APPLE__)
46 # from qe3.cpp: "ppc"
47 # from qe3.cpp: #elif defined(WIN32)
48 # from qe3.cpp: "exe"
49 # from qe3.cpp: #else
50 # from qe3.cpp: #error "unknown platform"
51 # from qe3.cpp: #endif
52 # from qe3.cpp: ;
53
54 .PHONY: all
55 all: \
56         makeversion \
57         install/q3map2.$(EXE) \
58         install/q3data.$(EXE) \
59         install/radiant.$(EXE) \
60         install/modules/archivezip.$(DLL) \
61         install/modules/entity.$(DLL) \
62         install/modules/image.$(DLL) \
63         install/modules/imagepng.$(DLL) \
64         install/modules/mapq3.$(DLL) \
65         install/modules/md3model.$(DLL) \
66         install/modules/model.$(DLL) \
67         install/modules/shaders.$(DLL) \
68         install/modules/vfspk3.$(DLL) \
69         install/modules/bobtoolz.$(DLL) \
70         install/modules/brushexport.$(DLL) \
71         install-data \
72
73 .PHONY: clean
74 clean:
75         $(RM_R) install/
76         $(FIND) . \( -name \*.o -o -name \*.$(DLL) -o -name \*.$(A) -o -name \*.$(EXE) \) -exec $(RM) {} \;
77
78 %.$(EXE):
79         dir=$@; $(MKDIR) $${dir%/*}
80         $(CXX) -o $@ $^ $(LDFLAGS) $(LIBS)
81         [ -z "$(LDD)" ] || [ -z "`$(LDD) -r $@ 2>&1 >/dev/null $(TEE_STDERR)`" ] || { $(RM) $@; exit 1; }
82
83 %.$(A):
84         $(AR) rc $@ $^
85         $(RANLIB) $@
86
87 %.$(DLL):
88         dir=$@; $(MKDIR) $${dir%/*}
89         $(CXX) -shared -o $@ $^ $(LDFLAGS) $(LDFLAGS_DLL) $(LIBS)
90         [ -z "$(LDD)" ] || [ -z "`$(LDD) -r $@ 2>&1 >/dev/null $(TEE_STDERR)`" ] || { $(RM) $@; exit 1; }
91
92 install/q3map2.$(EXE): LIBS := $(LIBS_XML) $(LIBS_GLIB) $(LIBS_PNG)
93 install/q3map2.$(EXE): CPPFLAGS := $(CPPFLAGS_COMMON) $(CPPFLAGS_XML) $(CPPFLAGS_GLIB) $(CPPFLAGS_PNG) -Itools/quake3/common -Ilibs -Iinclude
94 install/q3map2.$(EXE): \
95         tools/quake3/common/cmdlib.o \
96         tools/quake3/common/imagelib.o \
97         tools/quake3/common/inout.o \
98         tools/quake3/common/mutex.o \
99         tools/quake3/common/polylib.o \
100         tools/quake3/common/scriplib.o \
101         tools/quake3/common/threads.o \
102         tools/quake3/common/unzip.o \
103         tools/quake3/common/vfs.o \
104         tools/quake3/common/md4.o \
105         tools/quake3/q3map2/brush.o \
106         tools/quake3/q3map2/brush_primit.o \
107         tools/quake3/q3map2/bspfile_abstract.o \
108         tools/quake3/q3map2/bspfile_ibsp.o \
109         tools/quake3/q3map2/bspfile_rbsp.o \
110         tools/quake3/q3map2/bsp.o \
111         tools/quake3/q3map2/convert_ase.o \
112         tools/quake3/q3map2/convert_map.o \
113         tools/quake3/q3map2/decals.o \
114         tools/quake3/q3map2/facebsp.o \
115         tools/quake3/q3map2/fog.o \
116         tools/quake3/q3map2/image.o \
117         tools/quake3/q3map2/leakfile.o \
118         tools/quake3/q3map2/light_bounce.o \
119         tools/quake3/q3map2/lightmaps_ydnar.o \
120         tools/quake3/q3map2/light.o \
121         tools/quake3/q3map2/light_trace.o \
122         tools/quake3/q3map2/light_ydnar.o \
123         tools/quake3/q3map2/main.o \
124         tools/quake3/q3map2/map.o \
125         tools/quake3/q3map2/mesh.o \
126         tools/quake3/q3map2/model.o \
127         tools/quake3/q3map2/patch.o \
128         tools/quake3/q3map2/path_init.o \
129         tools/quake3/q3map2/portals.o \
130         tools/quake3/q3map2/prtfile.o \
131         tools/quake3/q3map2/shaders.o \
132         tools/quake3/q3map2/surface_extra.o \
133         tools/quake3/q3map2/surface_foliage.o \
134         tools/quake3/q3map2/surface_fur.o \
135         tools/quake3/q3map2/surface_meta.o \
136         tools/quake3/q3map2/surface.o \
137         tools/quake3/q3map2/tjunction.o \
138         tools/quake3/q3map2/tree.o \
139         tools/quake3/q3map2/visflow.o \
140         tools/quake3/q3map2/vis.o \
141         tools/quake3/q3map2/writebsp.o \
142         libmathlib.$(A) \
143         libl_net.$(A) \
144         libjpeg6.$(A) \
145         libpicomodel.$(A) \
146         libddslib.$(A) \
147
148 libmathlib.$(A): CPPFLAGS := $(CPPFLAGS_COMMON) -Ilibs
149 libmathlib.$(A): \
150         libs/mathlib/mathlib.o \
151         libs/mathlib/bbox.o \
152         libs/mathlib/line.o \
153         libs/mathlib/m4x4.o \
154         libs/mathlib/ray.o \
155
156 libl_net.$(A): CPPFLAGS := $(CPPFLAGS_COMMON) -Ilibs
157 libl_net.$(A): \
158         libs/l_net/l_net.o \
159         libs/l_net/l_net_$(NETAPI).o \
160
161 libjpeg6.$(A): CPPFLAGS := $(CPPFLAGS_COMMON) -Ilibs/jpeg6 -Ilibs
162 libjpeg6.$(A): \
163         libs/jpeg6/jcomapi.o \
164         libs/jpeg6/jdcoefct.o \
165         libs/jpeg6/jdinput.o \
166         libs/jpeg6/jdpostct.o \
167         libs/jpeg6/jfdctflt.o \
168         libs/jpeg6/jpgload.o \
169         libs/jpeg6/jdapimin.o \
170         libs/jpeg6/jdcolor.o \
171         libs/jpeg6/jdmainct.o \
172         libs/jpeg6/jdsample.o \
173         libs/jpeg6/jidctflt.o \
174         libs/jpeg6/jutils.o \
175         libs/jpeg6/jdapistd.o \
176         libs/jpeg6/jddctmgr.o \
177         libs/jpeg6/jdmarker.o \
178         libs/jpeg6/jdtrans.o \
179         libs/jpeg6/jmemmgr.o \
180         libs/jpeg6/jdatasrc.o \
181         libs/jpeg6/jdhuff.o \
182         libs/jpeg6/jdmaster.o \
183         libs/jpeg6/jerror.o \
184         libs/jpeg6/jmemnobs.o \
185
186 libpicomodel.$(A): CPPFLAGS := $(CPPFLAGS_COMMON) -Ilibs
187 libpicomodel.$(A): \
188         libs/picomodel/picointernal.o \
189         libs/picomodel/picomodel.o \
190         libs/picomodel/picomodules.o \
191         libs/picomodel/pm_3ds.o \
192         libs/picomodel/pm_ase.o \
193         libs/picomodel/pm_md3.o \
194         libs/picomodel/pm_obj.o \
195         libs/picomodel/pm_ms3d.o \
196         libs/picomodel/pm_mdc.o \
197         libs/picomodel/pm_fm.o \
198         libs/picomodel/pm_md2.o \
199         libs/picomodel/pm_lwo.o \
200         libs/picomodel/pm_terrain.o \
201         libs/picomodel/lwo/clip.o \
202         libs/picomodel/lwo/envelope.o \
203         libs/picomodel/lwo/list.o \
204         libs/picomodel/lwo/lwio.o \
205         libs/picomodel/lwo/lwo2.o \
206         libs/picomodel/lwo/lwob.o \
207         libs/picomodel/lwo/pntspols.o \
208         libs/picomodel/lwo/surface.o \
209         libs/picomodel/lwo/vecmath.o \
210         libs/picomodel/lwo/vmap.o \
211
212 libddslib.$(A): CPPFLAGS := $(CPPFLAGS_COMMON) -Ilibs
213 libddslib.$(A): \
214         libs/ddslib/ddslib.o \
215
216 install/q3data.$(EXE): LIBS := $(LIBS_XML) $(LIBS_GLIB)
217 install/q3data.$(EXE): CPPFLAGS := $(CPPFLAGS_COMMON) $(CPPFLAGS_XML) $(CPPFLAGS_GLIB) -Itools/quake3/common -Ilibs -Iinclude
218 install/q3data.$(EXE): \
219         tools/quake3/common/aselib.o \
220         tools/quake3/common/bspfile.o \
221         tools/quake3/common/cmdlib.o \
222         tools/quake3/common/imagelib.o \
223         tools/quake3/common/inout.o \
224         tools/quake3/common/md4.o \
225         tools/quake3/common/scriplib.o \
226         tools/quake3/common/trilib.o \
227         tools/quake3/common/unzip.o \
228         tools/quake3/common/vfs.o \
229         tools/quake3/q3data/3dslib.o \
230         tools/quake3/q3data/compress.o \
231         tools/quake3/q3data/images.o \
232         tools/quake3/q3data/md3lib.o \
233         tools/quake3/q3data/models.o \
234         tools/quake3/q3data/p3dlib.o \
235         tools/quake3/q3data/polyset.o \
236         tools/quake3/q3data/q3data.o \
237         tools/quake3/q3data/stripper.o \
238         tools/quake3/q3data/video.o \
239         libmathlib.$(A) \
240         libl_net.$(A) \
241
242 install/radiant.$(EXE): LIBS := -ldl -lGL -static-libgcc $(LIBS_XML) $(LIBS_GLIB) $(LIBS_GTK) $(LIBS_GTKGLEXT)
243 install/radiant.$(EXE): CPPFLAGS := $(CPPFLAGS_COMMON) $(CPPFLAGS_XML) $(CPPFLAGS_GLIB) $(CPPFLAGS_GTK) $(CPPFLAGS_GTKGLEXT) -Ilibs -Iinclude
244 #install/radiant.$(EXE): LDFLAGS := -fPIC -Wl,-fini,fini_stub $(LDFLAGS_COMMON)
245 install/radiant.$(EXE): \
246         radiant/autosave.o \
247         radiant/brush.o \
248         radiant/brushmanip.o \
249         radiant/brushmodule.o \
250         radiant/brushnode.o \
251         radiant/brushtokens.o \
252         radiant/brushxml.o \
253         radiant/brush_primit.o \
254         radiant/build.o \
255         radiant/camwindow.o \
256         radiant/clippertool.o \
257         radiant/commands.o \
258         radiant/console.o \
259         radiant/csg.o \
260         radiant/dialog.o \
261         radiant/eclass.o \
262         radiant/eclass_def.o \
263         radiant/eclass_doom3.o \
264         radiant/eclass_fgd.o \
265         radiant/eclass_xml.o \
266         radiant/entity.o \
267         radiant/entityinspector.o \
268         radiant/entitylist.o \
269         radiant/environment.o \
270         radiant/error.o \
271         radiant/feedback.o \
272         radiant/filetypes.o \
273         radiant/filters.o \
274         radiant/findtexturedialog.o \
275         radiant/glwidget.o \
276         radiant/grid.o \
277         radiant/groupdialog.o \
278         radiant/gtkdlgs.o \
279         radiant/gtkmisc.o \
280         radiant/help.o \
281         radiant/image.o \
282         radiant/main.o \
283         radiant/mainframe.o \
284         radiant/map.o \
285         radiant/mru.o \
286         radiant/nullmodel.o \
287         radiant/parse.o \
288         radiant/patch.o \
289         radiant/patchdialog.o \
290         radiant/patchmanip.o \
291         radiant/patchmodule.o \
292         radiant/plugin.o \
293         radiant/pluginapi.o \
294         radiant/pluginmanager.o \
295         radiant/pluginmenu.o \
296         radiant/plugintoolbar.o \
297         radiant/points.o \
298         radiant/preferencedictionary.o \
299         radiant/preferences.o \
300         radiant/qe3.o \
301         radiant/qgl.o \
302         radiant/referencecache.o \
303         radiant/renderer.o \
304         radiant/renderstate.o \
305         radiant/scenegraph.o \
306         radiant/stacktrace.o \
307         radiant/select.o \
308         radiant/selection.o \
309         radiant/server.o \
310         radiant/shaders.o \
311         radiant/sockets.o \
312         radiant/surfacedialog.o \
313         radiant/texmanip.o \
314         radiant/textures.o \
315         radiant/texwindow.o \
316         radiant/timer.o \
317         radiant/treemodel.o \
318         radiant/undo.o \
319         radiant/url.o \
320         radiant/view.o \
321         radiant/watchbsp.o \
322         radiant/winding.o \
323         radiant/windowobservers.o \
324         radiant/xmlstuff.o \
325         radiant/xywindow.o \
326         libmathlib.$(A) \
327         libcmdlib.$(A) \
328         libl_net.$(A) \
329         libprofile.$(A) \
330         libgtkutil.$(A) \
331         libxmllib.$(A) \
332
333 libcmdlib.$(A): CPPFLAGS := $(CPPFLAGS_COMMON) -Ilibs
334 libcmdlib.$(A): \
335         libs/cmdlib/cmdlib.o \
336
337 libprofile.$(A): CPPFLAGS := $(CPPFLAGS_COMMON) -Ilibs -Iinclude
338 libprofile.$(A): \
339         libs/profile/profile.o \
340         libs/profile/file.o \
341
342 libgtkutil.$(A): CPPFLAGS := $(CPPFLAGS_COMMON) $(CPPFLAGS_GLIB) $(CPPFLAGS_GTK) $(CPPFLAGS_GTKGLEXT) -Ilibs -Iinclude
343 libgtkutil.$(A): \
344         libs/gtkutil/accelerator.o \
345         libs/gtkutil/button.o \
346         libs/gtkutil/clipboard.o \
347         libs/gtkutil/closure.o \
348         libs/gtkutil/container.o \
349         libs/gtkutil/cursor.o \
350         libs/gtkutil/dialog.o \
351         libs/gtkutil/entry.o \
352         libs/gtkutil/frame.o \
353         libs/gtkutil/filechooser.o \
354         libs/gtkutil/glfont.o \
355         libs/gtkutil/glwidget.o \
356         libs/gtkutil/image.o \
357         libs/gtkutil/idledraw.o \
358         libs/gtkutil/menu.o \
359         libs/gtkutil/messagebox.o \
360         libs/gtkutil/nonmodal.o \
361         libs/gtkutil/paned.o \
362         libs/gtkutil/pointer.o \
363         libs/gtkutil/toolbar.o \
364         libs/gtkutil/widget.o \
365         libs/gtkutil/window.o \
366         libs/gtkutil/xorrectangle.o \
367
368 libxmllib.$(A): CPPFLAGS := $(CPPFLAGS_COMMON) $(CPPFLAGS_XML) $(CPPFLAGS_GLIB) -Ilibs -Iinclude
369 libxmllib.$(A): \
370         libs/xml/ixml.o \
371         libs/xml/xmlparser.o \
372         libs/xml/xmlwriter.o \
373         libs/xml/xmlelement.o \
374         libs/xml/xmltextags.o \
375
376 install/modules/archivezip.$(DLL): LIBS := -lz
377 install/modules/archivezip.$(DLL): CPPFLAGS := $(CPPFLAGS_COMMON) -Ilibs -Iinclude
378 install/modules/archivezip.$(DLL): \
379         plugins/archivezip/plugin.o \
380         plugins/archivezip/archive.o \
381         plugins/archivezip/pkzip.o \
382         plugins/archivezip/zlibstream.o \
383
384 install/modules/entity.$(DLL): CPPFLAGS := $(CPPFLAGS_COMMON) -Ilibs -Iinclude
385 install/modules/entity.$(DLL): \
386         plugins/entity/plugin.o \
387         plugins/entity/entity.o \
388         plugins/entity/eclassmodel.o \
389         plugins/entity/generic.o \
390         plugins/entity/group.o \
391         plugins/entity/light.o \
392         plugins/entity/miscmodel.o \
393         plugins/entity/doom3group.o \
394         plugins/entity/skincache.o \
395         plugins/entity/angle.o \
396         plugins/entity/angles.o \
397         plugins/entity/colour.o \
398         plugins/entity/filters.o \
399         plugins/entity/model.o \
400         plugins/entity/namedentity.o \
401         plugins/entity/origin.o \
402         plugins/entity/scale.o \
403         plugins/entity/targetable.o \
404         plugins/entity/rotation.o \
405         plugins/entity/modelskinkey.o \
406
407 install/modules/image.$(DLL): CPPFLAGS := $(CPPFLAGS_COMMON) -Ilibs -Iinclude
408 install/modules/image.$(DLL): \
409         plugins/image/bmp.o \
410         plugins/image/jpeg.o \
411         plugins/image/image.o \
412         plugins/image/pcx.o \
413         plugins/image/tga.o \
414         plugins/image/dds.o \
415         libjpeg6.$(A) \
416         libddslib.$(A) \
417
418 install/modules/imagepng.$(DLL): LIBS := $(LIBS_PNG)
419 install/modules/imagepng.$(DLL): CPPFLAGS := $(CPPFLAGS_COMMON) $(CPPFLAGS_PNG) -Ilibs -Iinclude
420 install/modules/imagepng.$(DLL): \
421         plugins/imagepng/plugin.o \
422
423 install/modules/mapq3.$(DLL): CPPFLAGS := $(CPPFLAGS_COMMON) -Ilibs -Iinclude
424 install/modules/mapq3.$(DLL): \
425         plugins/mapq3/plugin.o \
426         plugins/mapq3/parse.o \
427         plugins/mapq3/write.o \
428
429 install/modules/md3model.$(DLL): CPPFLAGS := $(CPPFLAGS_COMMON) -Ilibs -Iinclude
430 install/modules/md3model.$(DLL): \
431         plugins/md3model/plugin.o \
432         plugins/md3model/mdl.o \
433         plugins/md3model/md3.o \
434         plugins/md3model/md2.o \
435         plugins/md3model/mdc.o \
436         plugins/md3model/mdlimage.o \
437         plugins/md3model/md5.o \
438
439 install/modules/model.$(DLL): CPPFLAGS := $(CPPFLAGS_COMMON) -Ilibs -Iinclude
440 install/modules/model.$(DLL): \
441         plugins/model/plugin.o \
442         plugins/model/model.o \
443         libpicomodel.$(A) \
444
445 install/modules/shaders.$(DLL): LIBS := $(LIBS_GLIB)
446 install/modules/shaders.$(DLL): CPPFLAGS := $(CPPFLAGS_COMMON) $(CPPFLAGS_GLIB) -Ilibs -Iinclude
447 install/modules/shaders.$(DLL): \
448         plugins/shaders/plugin.o \
449         plugins/shaders/shaders.o \
450
451 install/modules/vfspk3.$(DLL): LIBS := $(LIBS_GLIB)
452 install/modules/vfspk3.$(DLL): CPPFLAGS := $(CPPFLAGS_COMMON) $(CPPFLAGS_GLIB) -Ilibs -Iinclude
453 install/modules/vfspk3.$(DLL): \
454         plugins/vfspk3/archive.o \
455         plugins/vfspk3/vfs.o \
456         plugins/vfspk3/vfspk3.o \
457
458 install/modules/bobtoolz.$(DLL): LIBS := $(LIBS_GLIB) $(LIBS_GTK)
459 install/modules/bobtoolz.$(DLL): CPPFLAGS := $(CPPFLAGS_COMMON) $(CPPFLAGS_GLIB) $(CPPFLAGS_GTK) -Ilibs -Iinclude
460 install/modules/bobtoolz.$(DLL): \
461         contrib/bobtoolz/dialogs/dialogs-gtk.os \
462         contrib/bobtoolz/bobToolz-GTK.os \
463         contrib/bobtoolz/bsploader.os \
464         contrib/bobtoolz/cportals.os \
465         contrib/bobtoolz/DBobView.os \
466         contrib/bobtoolz/DBrush.os \
467         contrib/bobtoolz/DEntity.os \
468         contrib/bobtoolz/DEPair.os \
469         contrib/bobtoolz/DMap.os \
470         contrib/bobtoolz/DPatch.os \
471         contrib/bobtoolz/DPlane.os \
472         contrib/bobtoolz/DPoint.os \
473         contrib/bobtoolz/DShape.os \
474         contrib/bobtoolz/DTrainDrawer.os \
475         contrib/bobtoolz/DTreePlanter.os \
476         contrib/bobtoolz/DVisDrawer.os \
477         contrib/bobtoolz/DWinding.os \
478         contrib/bobtoolz/funchandlers-GTK.os \
479         contrib/bobtoolz/lists.os \
480         contrib/bobtoolz/misc.os \
481         contrib/bobtoolz/ScriptParser.os \
482         contrib/bobtoolz/shapes.os \
483         contrib/bobtoolz/visfind.os \
484         libmathlib.$(A) \
485         libcmdlib.$(A) \
486         libprofile.$(A) \
487
488 install/modules/brushexport.$(DLL): LIBS := $(LIBS_GLIB) $(LIBS_GTK)
489 install/modules/brushexport.$(DLL): CPPFLAGS := $(CPPFLAGS_COMMON) $(CPPFLAGS_GLIB) $(CPPFLAGS_GTK) -Ilibs -Iinclude
490 install/modules/brushexport.$(DLL): \
491         contrib/brushexport/plugin.o \
492         contrib/brushexport/interface.o \
493         contrib/brushexport/callbacks.o \
494         contrib/brushexport/support.o \
495         contrib/brushexport/export.o \
496
497 install/modules/prtview.$(DLL): LIBS := $(LIBS_GLIB) $(LIBS_GTK)
498 install/modules/prtview.$(DLL): CPPFLAGS := $(CPPFLAGS_COMMON) $(CPPFLAGS_GLIB) $(CPPFLAGS_GTK) -Ilibs -Iinclude
499 install/modules/prtview.$(DLL): \
500         contrib/prtview/AboutDialog.o \
501         contrib/prtview/ConfigDialog.o \
502         contrib/prtview/LoadPortalFileDialog.o \
503         contrib/prtview/portals.o \
504         contrib/prtview/prtview.o \
505         libprofile.$(A) \
506
507 install/modules/shaderplug.$(DLL): LIBS := $(LIBS_GLIB) $(LIBS_GTK) $(LIBS_XML)
508 install/modules/shaderplug.$(DLL): CPPFLAGS := $(CPPFLAGS_COMMON) $(CPPFLAGS_GLIB) $(CPPFLAGS_GTK) $(CPPFLAGS_XML) -Ilibs -Iinclude
509 install/modules/shaderplug.$(DLL): \
510         contrib/shaderplug/shaderplug.o \
511         libxmllib.$(A) \
512
513 install/modules/sunplug.$(DLL): LIBS := $(LIBS_GLIB) $(LIBS_GTK)
514 install/modules/sunplug.$(DLL): CPPFLAGS := $(CPPFLAGS_COMMON) $(CPPFLAGS_GLIB) $(CPPFLAGS_GTK) -Ilibs -Iinclude
515 install/modules/sunplug.$(DLL): \
516         contrib/sunplug/sunplug.o \
517
518 .PHONY: makeversion
519 makeversion:
520         set -ex; \
521         ver=`cat include/version.default`; \
522         major=`echo $$ver | cut -d . -f 2`; \
523         minor=`echo $$ver | cut -d . -f 3 | cut -d - -f 1`; \
524         echo "// generated header, see Makefile" > include/version.h; \
525         echo "#define RADIANT_VERSION \"$$ver\"" >> include/version.h; \
526         echo "#define RADIANT_MAJOR_VERSION \"$$major\"" >> include/version.h; \
527         echo "#define RADIANT_MINOR_VERSION \"$$minor\"" >> include/version.h; \
528         echo "$$major" > include/RADIANT_MAJOR; \
529         echo "$$minor" > include/RADIANT_MINOR; \
530         echo "$$ver" > include/version; \
531         echo "// generated header, see Makefile" > include/aboutmsg.h; \
532         echo "#define RADIANT_ABOUTMSG \"$(RADIANT_ABOUTMSG)\"" >> include/aboutmsg.h; \
533
534 .PHONY: install-data
535 install-data:
536         $(MKDIR) install/games
537         set -ex; \
538         for GAME in games/*; do \
539                 for GAMEFILE in $$GAME/games/*.game; do \
540                         $(CP) "$$GAMEFILE" install/games/; \
541                 done; \
542                 for GAMEDIR in $$GAME/*.game; do \
543                         $(CP_R) "$$GAMEDIR" install/; \
544                 done; \
545         done
546         $(CP) include/RADIANT_MAJOR install/
547         $(CP) include/RADIANT_MINOR install/
548         $(CP_R) setup/data/tools/* install/
549         $(FIND) install/ -name .svn -exec $(RM_R) {} \; -prune; \