Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit d19b026

Browse files
author
Jason
committed
feat: Makefile 功能调整
1 parent 9adf1fd commit d19b026

File tree

2 files changed

+28
-17
lines changed

2 files changed

+28
-17
lines changed

‎Makefile‎

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,17 @@
1-
SORT_TARGET=./sorting/QuickSort.cpp
2-
SORT_LIB=./sorting/lib/DoubleVector.cpp
1+
TARGET=./sorting/QuickSort.cpp
2+
LIB=./sorting/lib/DoubleVector.cpp
33

4-
compileSorting:
5-
g++ ${SORT_TARGET} ${SORT_LIB}
4+
# 编译源文件
5+
compile:
6+
# Compile
7+
g++ ${TARGET} ${LIB}
68

7-
runSorting:
8-
./sorting/a.out
9+
# 运行编译后的可执行文件
10+
run: compile
11+
# Run
12+
./a.out
13+
14+
# 删除可执行文件
15+
clean:
16+
# Clean
17+
rm -rf *.out

‎README.md‎

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,20 @@
11
# C++ 算法
2-
> 参考 [C-Plus-Plus](https://github.com/TheAlgorithms/C-Plus-Plus) 库,但代码稍有不同,主要用于练手所用
2+
> 本项目参考多种语言算法实现,并根据自己的理解进行C++的实现
33
44
## 项目导览
5-
- [排序算法](./sorting/README.md)
6-
- other
5+
- 猛戳 👉[排序算法](./sorting/README.md)
6+
- Other
77

88
## Run
9+
> [sorting/QuickSort.cpp](./sorting/QuickSort.cpp)文件为例运行步骤如下:
910
10-
### [QuickSort.cpp](./sorting/QuickSort.cpp)文件为例运行步骤如下:
11-
1. 进入对应目录 `cd sorting`
12-
2. 编译cpp文件 `g++ QuickSort.cpp ./lib/DoubleVector.cpp` ,默认会输出 `a.out` 文件 (具体命令视情况而定)
13-
3. 执行编译后的文件 `./a.out`
11+
### Normal Run
12+
- Enter target directory `cd sorting`
13+
- Compile `g++ QuickSort.cpp ./lib/QuickSort.cpp` ,默认会输出 `a.out` 文件 (具体命令视情况而定)
14+
- Run `./a.out`
1415

15-
## Fast Run
16-
### [QuickSort.cpp](./sorting/QuickSort.cpp)文件为例运行步骤如下:
17-
1. Compile `make compileSorting TARGET=./sorting/QuickSort.cpp`
18-
2. Run `make runSorting`
16+
### Fast Run
17+
- Compile & Run `make run ./sorting/QuickSort.cpp`
18+
19+
## Reference Link
20+
- [C-Plus-Plus](https://github.com/TheAlgorithms/C-Plus-Plus)

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /