fix mingw warnings
[xonotic/darkplaces.git] / makefile.mingw
1
2 OBJECTS= builddate.o 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_dgrm.o net_loop.o net_main.o pr_cmds.o pr_edict.o pr_exec.o r_light.o r_particles.o r_explosion.o sbar.o snd_dma.o snd_mem.o snd_mix.o sv_main.o sv_move.o sv_phys.o sv_user.o sv_light.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
3
4 #K6/athlon optimizations
5 #CPUOPTIMIZATIONS=-march=k6
6 #686 optimizations
7 CPUOPTIMIZATIONS=-march=i686
8
9 #note:
10 #the -Werror can be removed to compile even if there are warnings,
11 #this is used to ensure that all released versions are free of warnings.
12
13 OPTIMIZATIONS= -O6 -ffast-math -funroll-loops -fomit-frame-pointer -fexpensive-optimizations $(CPUOPTIMIZATIONS)
14 # -Werror
15 # -D WIN32 -D NDEBUG -D _WINDOWS -D _M_IX86
16
17 CFLAGS= -I/usr/local/mingw/include -MD -Wall $(OPTIMIZATIONS)
18 LDFLAGS= -L/msdev/lib -L/usr/local/mingw/lib -luser32 -lgdi32 -lwinmm -ldxguid -ldinput -lopengl32 -lcomctl32 -lwsock32
19
20 all: builddate darkplaces
21
22 builddate:
23         del builddate.o
24         del builddate.d
25
26 .c.o:
27         gcc $(CFLAGS) -c $*.c
28
29 darkplaces: $(OBJECTS) vid_wgl.o sys_win.o snd_win.o net_win.o net_wins.o net_wipx.o cd_win.o in_win.o conproc.o
30         gcc -o $@ $^ $(LDFLAGS)
31
32
33 clean:
34         del darkplaces.exe
35         del *.o
36         del *.d
37
38 .PHONY: clean builddate
39
40 -include *.d