raycasting/makefile

29 lines
404 B
Makefile
Raw Normal View History

2023-03-31 06:36:54 +08:00
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
2023-04-01 07:15:53 +08:00
all: $(TARGET)
2023-03-31 06:36:54 +08:00
$(TARGET): $(OBJS)
$(CC) $^ -o $(TARGET) $(LDFLAGS) $(CCFLAGS)
$(OBJS): $(OBJD)/%.o: %.cpp
mkdir -p $(@D)
$(CC) -c $? -o $@ $(CCFLAGS)
clean:
rm -r $(TARGET) $(OBJD)
2023-04-01 07:15:53 +08:00
run: main
2023-03-31 06:36:54 +08:00
./$(TARGET)