You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

18 lines
495 B
Makefile

CC = g++
CFLAGS = -O2 -Wall -Wextra -std=c++14
# to avoid the console window with mingw, add -mwindow
INC = -I "SFML21/include"
# for Linux
LDFLAGS = -L "SFML21/lib" -lsfml-system -lsfml-window -lsfml-graphics
# for Windows using MinGW
#LDFLAGS = -L "SFML21/lib" -lmingw32 -lsfml-main -lsfml-system -lsfml-window -lsfml-graphics
OBJ = level.o game.o player.o background.o mainmenu.o main.o
game: $(OBJ)
$(CC) $(CFLAGS) -o game.bin $(OBJ) $(LDFLAGS)
%.o: %.cpp
$(CC) $(INC) $(CFLAGS) -c $<