raycasting/makefile

31 lines
441 B
Makefile
Raw Permalink 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
2023-04-02 08:20:41 +08:00
.PHONY: all run clean tags
2023-03-31 06:36:54 +08:00
2023-04-02 08:20:41 +08:00
all: $(TARGET) tags
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-02 08:20:41 +08:00
run: $(TARGET) tags
2023-03-31 06:36:54 +08:00
./$(TARGET)
2023-04-02 08:20:41 +08:00
tags:
ctags -R