CC=gcc
+SDLCONFIG=sdl-config
-all:zeRace server
+all:zeRace server bot_anticip
-zeRace:zeRace.c network.h sdl.o car.o tracklist.o
- $(CC) -ansi -Wall -o zeRace zeRace.c sdl.o car.o tracklist.o `sdl-config --cflags --libs` -lSDL_net -lSDL_mixer -lSDL_image -lSDL_gfx
+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.
server:server.c network.h sdl.o car.o tracklist.o
- $(CC) -ansi -Wall -o server server.c sdl.o car.o tracklist.o `sdl-config --cflags --libs` -lSDL_net -lSDL_image
+ $(CC) -ansi -Wall -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.
sdl.o:sdl.c sdl.h
- $(CC) -ansi -Wall -c sdl.c `sdl-config --cflags`
+ $(CC) -ansi -Wall -c sdl.c `$(SDLCONFIG) --cflags`
-car.o:car.c car.h
- $(CC) -ansi -Wall -c car.c `sdl-config --cflags`
+car.o:car.c car.h sdl.h
+ $(CC) -ansi -Wall -c car.c `$(SDLCONFIG) --cflags`
tracklist.o:tracklist.c tracklist.h
$(CC) -ansi -Wall -c tracklist.c
+bot.o:bot.c sdl.o car.o tracklist.o
+ $(CC) -ansi -Wall -c bot.c `$(SDLCONFIG) --cflags`
+
+icon.o:icon.rc
+ $(WINDRES) -i icon.rc -o icon.o
+
clean:
- rm -f zeRace server *.o *.cfg
+ rm -f zeRace server bot_anticip *.exe *.o *.cfg