3 #uncomment these according to your sound driver
5 #recommended for: anyone not using ALSA 0.5
6 SND=snd_oss.o snd_dma.o snd_mix.o snd_mem.o
8 #recommended for: anyone using ALSA 0.5
9 #SND=snd_alsa_0_5.o snd_dma.o snd_mix.o snd_mem.o
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
14 #recommended for: anyone who can't use the above drivers
19 #uncomment your preference
20 #if you want CD sound in Linux
22 #if you want no CD audio
25 CLIENTOBJECTS= cgame.o cgamevm.o chase.o cl_collision.o cl_demo.o cl_input.o cl_main.o cl_parse.o cl_particles.o cl_screen.o cl_video.o console.o dpvsimpledecode.o fractalnoise.o gl_backend.o gl_draw.o gl_models.o gl_rmain.o gl_rsurf.o gl_textures.o keys.o menu.o meshqueue.o r_crosshairs.o r_explosion.o r_explosion.o r_lerpanim.o r_light.o r_modules.o r_sky.o r_sprites.o sbar.o ui.o vid_shared.o view.o wavefile.o
26 SERVEROBJECTS= pr_cmds.o pr_edict.o pr_exec.o sv_light.o sv_main.o sv_move.o sv_phys.o sv_user.o
27 SHAREDOBJECTS= builddate.o cmd.o collision.o common.o crc.o cvar.o filematch.o host.o host_cmd.o image.o mathlib.o matrixlib.o model_alias.o model_brush.o model_shared.o model_sprite.o net_bsd.o net_dgrm.o net_loop.o net_main.o net_master.o net_udp.o palette.o portals.o protocol.o quakeio.o sys_linux.o sys_shared.o transform.o world.o wad.o zone.o $(NETOBJECTS) $(SERVEROBJECTS)
30 #K6/athlon optimizations
31 #CPUOPTIMIZATIONS=-march=k6
32 #note: don't use -march=athlon, every gcc which has it currently (2.96-3.1)
33 #have optimizer bugs (like entities disappearing randomly - a bug with
34 #compiling BOX_ON_PLANE_SIDE in mathlib.h)
35 #CPUOPTIMIZATIONS=-march=athlon
37 #CPUOPTIMIZATIONS=-march=i686
41 #use this line for profiling
43 #use this line for no profiling
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.
51 OPTIMIZATIONS= -O6 -fno-strict-aliasing -ffast-math -funroll-loops -fexpensive-optimizations $(CPUOPTIMIZATIONS)
52 CFLAGS= -MD -Wall -Werror $(OPTIMIZATIONS) $(PROFILEOPTION)
55 #CFLAGS= -MD -Wall -Werror -ggdb $(OPTIMIZATIONS) $(PROFILEOPTION)
57 LDFLAGS= $(PROFILEOPTION) -lm -ldl
59 all: builddate darkplaces-dedicated darkplaces-glx
65 gcc $(CFLAGS) -c vid_glx.c -I/usr/X11R6/include
70 darkplaces-glx: $(SHAREDOBJECTS) $(CLIENTOBJECTS) $(SERVEROBJECTS) vid_glx.o $(CD) $(SND)
71 gcc -o $@ $^ $(LDFLAGS) -L/usr/X11R6/lib -lX11 -lXext -lXxf86dga -lXxf86vm $(SOUNDLIB)
73 darkplaces-dedicated: $(SHAREDOBJECTS) $(CLIENTOBJECTS) $(SERVEROBJECTS) vid_null.o cd_null.o snd_null.o
74 gcc -o $@ $^ $(LDFLAGS)
77 -rm -f darkplaces-glx darkplaces-dedicated *.o *.d
79 .PHONY: clean builddate