This repository has been archived on 2020-10-03. You can view files and clone it, but cannot push or open issues or pull requests.
pgai_tp1/Makefile
2020-09-23 14:54:08 +02:00

27 lines
525 B
Makefile

CC := g++ -Wall -Wextra -Wpedantic -Iinclude -Ilibs/OpenMesh/inc -g
LDFLAGS := $(LDFLAGS) -Llibs/OpenMesh/liblinux/ -lOpenMeshCore
CFLAGS := $(CFLAGS)
BUILD_DIR ?= build
OUT := $(notdir $(shell pwd))
SRC := $(wildcard src/*.cpp)
OBJS := $(patsubst src/%.cpp,$(BUILD_DIR)/%.o,$(SRC))
DEPS := $(wildcard $(BUILD_DIR)/*.d)
$(BUILD_DIR)/$(OUT): $(OBJS)
$(CC) $(LDFLAGS) -o $@ $^
-include $(DEPS)
$(BUILD_DIR)/%.o: src/%.cpp
$(CC) $(CFLAGS) -MP -MD $< -c -o $@
clean:
-rm -f $(BUILD_DIR)/*.o
-rm -f $(BUILD_DIR)/*.d