]> icculus.org git repositories - divverent/darkplaces.git/blob - makefile
added cl_explosions and cl_stainmaps cvars, which will be used soon...
[divverent/darkplaces.git] / makefile
1
2
3 #uncomment these according to your sound driver
4
5 #recommended for: anyone not using ALSA 0.5
6 SND=snd_oss.o snd_dma.o snd_mix.o snd_mem.o
7 SOUNDLIB=
8 #recommended for: anyone using ALSA 0.5
9 #SND=snd_alsa_0_5.o snd_dma.o snd_mix.o snd_mem.o
10 #SOUNDLIB=-lasound
11 #recommended for: no one (this driver needs to be updated, it doesn't compile anymore)
12 #SND=snd_alsa_0_9.o snd_dma.o snd_mix.o snd_mem.o
13 #SOUNDLIB=-lasound
14 #recommended for: anyone who can't use the above drivers
15 #SND=snd_null.o
16 #SOUNDLIB=
17
18
19 #uncomment your preference
20 #if you want CD sound in Linux
21 #CD=cd_linux.o
22 #if you want no CD audio
23 CD=cd_null.o
24
25 OBJECTS= builddate.o $(CD) $(SND) chase.o cl_demo.o cl_input.o cl_main.o cl_parse.o cl_tent.o cmd.o common.o console.o crc.o cvar.o fractalnoise.o gl_draw.o r_sky.o gl_rmain.o gl_rsurf.o host.o host_cmd.o image.o keys.o mathlib.o menu.o model_alias.o model_brush.o model_shared.o model_sprite.o net_bsd.o net_udp.o net_dgrm.o net_loop.o net_main.o pr_cmds.o pr_edict.o pr_exec.o r_light.o r_explosion.o sbar.o sv_main.o sv_move.o sv_phys.o sv_user.o sv_light.o sys_linux.o transform.o view.o wad.o world.o zone.o vid_shared.o palette.o r_crosshairs.o gl_textures.o gl_models.o r_sprites.o r_modules.o r_explosion.o r_lerpanim.o protocol.o quakeio.o r_clip.o ui.o portals.o sys_shared.o cl_light.o gl_backend.o cl_particles.o cl_screen.o cgamevm.o cgame.o filematch.o collision.o cl_collision.o matrixlib.o cl_video.o dpvsimpledecode.o wavefile.o
26
27 #K6/athlon optimizations
28 CPUOPTIMIZATIONS=-march=k6
29 #note: don't use -march=athlon, every gcc which has it currently (2.96-3.1)
30 #have optimizer bugs (like entities disappearing randomly - a bug with
31 #compiling BOX_ON_PLANE_SIDE in mathlib.h)
32 #CPUOPTIMIZATIONS=-march=athlon
33 #686 optimizations
34 #CPUOPTIMIZATIONS=-march=i686
35
36 #use this line for profiling
37 PROFILEOPTION=-pg -g
38 NOPROFILEOPTIMIZATIONS=
39 #use this line for no profiling
40 #PROFILEOPTION=
41 #NOPROFILEOPTIMIZATIONS=-fomit-frame-pointer
42 #use these lines for debugging without profiling
43 #PROFILEOPTION=
44 #NOPROFILEOPTIMIZATIONS=
45
46 #note:
47 #the -Werror can be removed to compile even if there are warnings,
48 #this is used to ensure that all released versions are free of warnings.
49
50 #normal compile
51 OPTIMIZATIONS= -O6 -fno-strict-aliasing -ffast-math -funroll-loops $(NOPROFILEOPTIMIZATIONS) -fexpensive-optimizations $(CPUOPTIMIZATIONS)
52 CFLAGS= -MD -Wall -Werror -I/usr/X11R6/include -I/usr/include/glide $(OPTIMIZATIONS) $(PROFILEOPTION)
53 #debug compile
54 #OPTIMIZATIONS=
55 #CFLAGS= -MD -Wall -Werror -I/usr/X11R6/include -ggdb $(OPTIMIZATIONS) $(PROFILEOPTION)
56
57 #LordHavoc: what is XIE?  XFree 4.1.0 doesn't need it and 4.2.0 seems to be missing it entirely
58 #LDFLAGS= -L/usr/X11R6/lib -lm -lX11 -lXext -lXIE -lXxf86dga -lXxf86vm -lGL -ldl $(SOUNDLIB) $(PROFILEOPTION)
59 LDFLAGS= -L/usr/X11R6/lib -lm -lX11 -lXext -lXxf86dga -lXxf86vm -lGL -ldl $(SOUNDLIB) $(PROFILEOPTION)
60
61 #if you don't need the -3dfx version, use this line
62 all: builddate darkplaces-glx
63 #all: builddate darkplaces-glx darkplaces-3dfx
64
65 builddate:
66         touch builddate.c
67
68 .c.o:
69         gcc $(CFLAGS) -c $*.c
70
71 darkplaces-glx: $(OBJECTS) vid_glx.o
72         gcc -o $@ $^ $(LDFLAGS)
73
74 darkplaces-3dfx: $(OBJECTS) in_svgalib.o vid_3dfxsvga.o
75         gcc -o $@ $^ $(LDFLAGS)
76
77
78 clean:
79         -rm -f darkplaces-glx darkplaces-3dfx *.o *.d
80
81 .PHONY: clean builddate
82
83 -include *.d
84