version 0.7
[zeRace] / Makefile
index a359dba..ec34343 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1,31 +1,37 @@
 CC=gcc
 SDLCONFIG=sdl-config
 
-all:zeRace server bot_anticip
+all:zeRace server bot_anticip bot_checkpoint optimize_checkpoint
 
 zeRace:zeRace.c network.h sdl.o car.o tracklist.o $(ICON)
-       $(CC) -ansi -Wall -o zeRace$(EXT) zeRace.c sdl.o car.o tracklist.o $(ICON) `$(SDLCONFIG) --cflags --libs` -lSDL_net -lSDL_mixer -lSDL_image -lSDL_gfx -L.
+       $(CC) -o zeRace$(EXT) zeRace.c sdl.o car.o tracklist.o $(ICON) `$(SDLCONFIG) --cflags --libs` -lSDL_net -lSDL_mixer -lSDL_image -lSDL_gfx -L.
 
 server:server.c network.h sdl.o car.o tracklist.o
-       $(CC) -ansi -Wall -o server$(EXT) server.c sdl.o car.o tracklist.o `$(SDLCONFIG) --cflags --libs` -lSDL_net -lSDL_image -L.
+       $(CC) -o server$(EXT) server.c sdl.o car.o tracklist.o `$(SDLCONFIG) --cflags --libs` -lSDL_net -lSDL_image -L.
 
 bot_anticip:bot_anticip.c bot.o sdl.o car.o tracklist.o
-       $(CC) -ansi -Wall -o bot_anticip$(EXT) bot_anticip.c bot.o sdl.o car.o tracklist.o `$(SDLCONFIG) --cflags --libs` -lSDL_net -lSDL_image -L.
+       $(CC) -o bot_anticip$(EXT) bot_anticip.c bot.o sdl.o car.o tracklist.o `$(SDLCONFIG) --cflags --libs` -lSDL_net -lSDL_image -L.
+
+bot_checkpoint:bot_checkpoint.c bot.o sdl.o car.o tracklist.o
+       $(CC) -o bot_checkpoint$(EXT) bot_checkpoint.c bot.o sdl.o car.o tracklist.o `$(SDLCONFIG) --cflags --libs` -lSDL_net -lSDL_image -L.
+
+optimize_checkpoint:bot_checkpoint.c sdl.o car.o tracklist.o
+       $(CC) -O2 -DOPTIMIZE -o optimize_checkpoint$(EXT) bot_checkpoint.c sdl.o car.o tracklist.o `$(SDLCONFIG) --cflags --libs` -lSDL_net -lSDL_image -L.
 
 sdl.o:sdl.c sdl.h
-       $(CC) -ansi -Wall -c sdl.c `$(SDLCONFIG) --cflags`
+       $(CC) -c sdl.c `$(SDLCONFIG) --cflags`
 
 car.o:car.c car.h sdl.h
-       $(CC) -ansi -Wall -c car.c `$(SDLCONFIG) --cflags`
+       $(CC) -c car.c `$(SDLCONFIG) --cflags`
 
 tracklist.o:tracklist.c tracklist.h
-       $(CC) -ansi -Wall -c tracklist.c
+       $(CC) -c tracklist.c
 
 bot.o:bot.c sdl.o car.o tracklist.o
-       $(CC) -ansi -Wall -c bot.c `$(SDLCONFIG) --cflags`
+       $(CC) -c bot.c `$(SDLCONFIG) --cflags`
 
 icon.o:icon.rc
        $(WINDRES) -i icon.rc -o icon.o
 
 clean:
-       rm -f zeRace server bot_anticip *.exe *.o *.cfg
+       rm -f zeRace server bot_anticip bot_checkpoint optimize_checkpoint *.exe *.o *.cfg