通过编译

This commit is contained in:
YuhangQ 2023-06-30 03:26:15 +00:00
parent 34f17a7b2e
commit e74d0af54b
3 changed files with 2 additions and 6 deletions

BIN
atpg

Binary file not shown.

View File

@ -5,20 +5,14 @@ SOURCES := $(shell find ./src -type f -name "*.cpp")
OBJECTS := $(addprefix build/,$(SOURCES:%=%.o))
# 声明编译器和编译选项
CC := gcc
CXX := g++
CFLAGS := -O3 -g -Wall -Wextra -MMD -MP -flto
CXXFLAGS := -O3 -g -Wall -Wextra -MMD -MP -flto
# 默认目标,编译所有目标文件
atpg: $(OBJECTS)
$(CXX) $(CXXFLAGS) $^ -o $@
# 生成目标文件的规则
build/%.o: % | build
$(CC) $(CFLAGS) -c $< -o $@
build/%.o: %.cpp | build
$(CXX) $(CXXFLAGS) -c $< -o $@
# 包含依赖文件

View File

@ -5,6 +5,8 @@
#include <unordered_map>
#include <unordered_set>
#include <queue>
#include <algorithm>
#include <assert.h>
using ll = long long;