1# Makefile for test program for game_libs - lunar lander 2CFLAGS=-Wall `sdl-config --libs --cflags` 3CC=gcc 4 5LIBS=SDL_image 6 7C_FILES=moon_lander.c game_lib.c DT_drawtext.c 8OBJ_FILES=moon_lander.o game_lib.o DT_drawtext.o 9OUT_FILE=moon-lander.exe 10 11all: game_lib 12 13game_lib: $(OBJ_FILES) 14 $(CC) $(CFLAGS) -o $(OUT_FILE) $(OBJ_FILES) -lmingw32 -lSDLmain -lSDL -mwindows -l$(LIBS) -lSDL_mixer 15 16moon_lander.o: moon_lander.c 17 $(CC) $(CFLAGS) -c -o $@ $^ 18 19game_lib.o: game_lib.c 20 $(CC) $(CFLAGS) -c -o $@ $^ 21 22DT_drawtext.o: DT_drawtext.c 23 $(CC) $(CFLAGS) -c -o $@ $^ 24 25clean: 26 rm -f *.o core 27 28install: 29 ./install.sh 30 31 32