-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
30 lines (26 loc) · 914 Bytes
/
Makefile
File metadata and controls
30 lines (26 loc) · 914 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
# Compiler and flags
CXX := g++
CXXFLAGS := -O3 -g3 -std=c++23 -Wall -Wextra -Iinclude
# Directories
SRC_DIR := src
TEST_DIR := tests
BIN_DIR := bin
# Default target
.PHONY: all clean
all: $(BIN_DIR)/mesh_lib_harness $(BIN_DIR)/tiny_obj_loader_harness $(BIN_DIR)/rapidobj_harness $(BIN_DIR)/fast_obj_harness
# Build the test harnesses
$(BIN_DIR)/mesh_lib_harness: $(SRC_DIR)/mesh.cpp $(TEST_DIR)/mesh_lib/mesh_lib_harness.cpp
@mkdir -p $(BIN_DIR)
$(CXX) $(CXXFLAGS) $^ -o $@
$(BIN_DIR)/tiny_obj_loader_harness: $(TEST_DIR)/tiny_obj_loader/tiny_obj_loader_harness.cpp
@mkdir -p $(BIN_DIR)
$(CXX) $(CXXFLAGS) $^ -o $@
$(BIN_DIR)/rapidobj_harness: $(TEST_DIR)/rapidobj/rapidobj_harness.cpp
@mkdir -p $(BIN_DIR)
$(CXX) $(CXXFLAGS) $^ -o $@
$(BIN_DIR)/fast_obj_harness: $(TEST_DIR)/fast_obj/fast_obj_harness.cpp
@mkdir -p $(BIN_DIR)
$(CXX) $(CXXFLAGS) $^ -o $@
# Clean build files
clean:
rm -rf $(BIN_DIR)