]> icculus.org git repositories - divverent/darkplaces.git/blob - makefile
Added a special key binding menu when compiling for BloodBath
[divverent/darkplaces.git] / makefile
1 #uncomment one of these according to your sound driver
2 #if you use ALSA version 0.9.x
3 #SND=snd_alsa_0_9.o
4 #SOUNDLIB=-lasound
5 #if you use ALSA version 0.5.x
6 #SND=snd_alsa_0_5.o
7 #SOUNDLIB=-lasound
8 #if you use the kernel sound driver or OSS
9 SND=snd_oss.o
10 SOUNDLIB=
11
12 #uncomment your preference
13 #if you want CD sound in Linux
14 #CD=cd_linux.o
15 #if you want no CD audio
16 CD=cd_null.o
17
18 OBJECTS= builddate.o $(CD) 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 snd_dma.o snd_mem.o snd_mix.o $(SND) 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
19
20 #K6/athlon optimizations
21 CPUOPTIMIZATIONS=-march=k6
22 #note: don't use -march=athlon, every gcc which has it currently (2.96-3.1)
23 #have optimizer bugs (like entities disappearing randomly - a bug with
24 #compiling BOX_ON_PLANE_SIDE in mathlib.h)
25 #CPUOPTIMIZATIONS=-march=athlon
26 #686 optimizations
27 #CPUOPTIMIZATIONS=-march=i686
28
29 #use this line for profiling
30 PROFILEOPTION=-pg -g
31 NOPROFILEOPTIMIZATIONS=
32 #use this line for no profiling
33 #PROFILEOPTION=
34 #NOPROFILEOPTIMIZATIONS=-fomit-frame-pointer
35 #use these lines for debugging without profiling
36 #PROFILEOPTION=
37 #NOPROFILEOPTIMIZATIONS=
38
39 #note:
40 #the -Werror can be removed to compile even if there are warnings,
41 #this is used to ensure that all released versions are free of warnings.
42
43 #normal compile
44 OPTIMIZATIONS= -O6 -ffast-math -funroll-loops $(NOPROFILEOPTIMIZATIONS) -fexpensive-optimizations $(CPUOPTIMIZATIONS)
45 CFLAGS= -MD -Wall -Werror -I/usr/X11R6/include -I/usr/include/glide $(OPTIMIZATIONS) $(PROFILEOPTION)
46 #debug compile
47 #OPTIMIZATIONS=
48 #CFLAGS= -MD -Wall -Werror -I/usr/X11R6/include -ggdb $(OPTIMIZATIONS) $(PROFILEOPTION)
49
50 #LordHavoc: what is XIE?  XFree 4.1.0 doesn't need it and 4.2.0 seems to be missing it entirely
51 #LDFLAGS= -L/usr/X11R6/lib -lm -lX11 -lXext -lXIE -lXxf86dga -lXxf86vm -lGL -ldl $(SOUNDLIB) $(PROFILEOPTION)
52 LDFLAGS= -L/usr/X11R6/lib -lm -lX11 -lXext -lXxf86dga -lXxf86vm -lGL -ldl $(SOUNDLIB) $(PROFILEOPTION)
53
54 #if you don't need the -3dfx version, use this line
55 all: builddate darkplaces-glx
56 #all: builddate darkplaces-glx darkplaces-3dfx
57
58 builddate:
59         touch builddate.c
60
61 .c.o:
62         gcc $(CFLAGS) -c $*.c
63
64 darkplaces-glx: $(OBJECTS) vid_glx.o
65         gcc -o $@ $^ $(LDFLAGS)
66
67 darkplaces-3dfx: $(OBJECTS) in_svgalib.o vid_3dfxsvga.o
68         gcc -o $@ $^ $(LDFLAGS)
69
70
71 clean:
72         -rm -f darkplaces-glx darkplaces-3dfx *.o *.d
73
74 .PHONY: clean builddate
75
76 -include *.d
77