Not sure, added Makefile

This commit is contained in:
Benjamin Morgan 2025-07-12 19:32:58 -06:00
parent b49080f675
commit fd2baa4257

25
Makefile Normal file
View file

@ -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)