-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
32 lines (23 loc) · 658 Bytes
/
Copy pathMakefile
File metadata and controls
32 lines (23 loc) · 658 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
31
32
# Makefile for DateTimeForCpp project
# Targets:test (test/test.cpp)
CXX := g++.exe
CXXFLAGS := -std=c++20 -O2 -g -Wall -Wextra
INCLUDES := -Iinclude
LDFLAGS :=
LDLIBS :=
# Build dir
BUILD_DIR := build
# Target files
TARGETS := $(BUILD_DIR)/test.exe
.PHONY: all clean test
all: $(TARGETS)
# Make build dir
$(BUILD_DIR):
@if not exist "$(BUILD_DIR)" mkdir "$(BUILD_DIR)"
# test - Test for DateTime
$(BUILD_DIR)/test.exe: test/test.cpp | $(BUILD_DIR)
$(CXX) $(CXXFLAGS) $(INCLUDES) $< -o $@ $(LDFLAGS)
test: $(BUILD_DIR)/test.exe
clean:
@if exist "$(BUILD_DIR)" rmdir /s /q "$(BUILD_DIR)"
-if exist $(BUILD_DIR) rmdir /s /q $(BUILD_DIR)