Initial commit

This commit is contained in:
2023-03-30 23:36:54 +01:00
commit dbb69dd80e
3 changed files with 57 additions and 0 deletions
+28
View File
@@ -0,0 +1,28 @@
TARGET = main
CC = g++
OBJD = obj
SRCS := $(wildcard *.cpp)
OBJS := $(SRCS:%.cpp=$(OBJD)/%.o)
CCFLAGS = -Wall
LDFLAGS = -lsfml-graphics -lsfml-window -lsfml-system
.PHONY: all run clean
all: $(TARGET) $(OBJD)
$(TARGET): $(OBJS)
$(CC) $^ -o $(TARGET) $(LDFLAGS) $(CCFLAGS)
$(OBJS): $(OBJD)/%.o: %.cpp
mkdir -p $(@D)
$(CC) -c $? -o $@ $(CCFLAGS)
clean:
rm -r $(TARGET) $(OBJD)
run:
./$(TARGET)