diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..6eec554 --- /dev/null +++ b/Makefile @@ -0,0 +1,25 @@ +TARGET = TowerDefense +SRC_FILES = main.cpp Game.cpp + +CXX = g++ +CFLAGS = -Wall -g -lsfml-graphics -lsfml-window -lsfml-system + +OBJECTS = $(SRC_FILES:.cpp=.o) + +ifeq ($(shell echo "Windows"), "Windows") + TARGET := $(TARGET).exe + DEL = del +else + DEL = rm +endif + +all: $(TARGET) + +$(TARGET): $(OBJECTS) + $(CXX) -o $@ $^ + +.cpp.o: + $(CXX) $(CFLAGS) -o $@ -c $< + +clean: + $(DEL) $(TARGET) $(OBJECTS) \ No newline at end of file