Skip to content

Commit

Permalink
fix(3.Unix与C): 修复makefile缩进问题 (#305)
Browse files Browse the repository at this point in the history
* fix(3.Unix与C): 修复makefile缩进问题

* docs(CourseTable): 添加课程回放链接
  • Loading branch information
E1PsyCongroo authored Oct 8, 2024
1 parent eae1df4 commit 61b4218
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 10 deletions.
14 changes: 6 additions & 8 deletions 2.编程模块/2.1 NekoBytes-TheMissing/2.1.1 Book/3.Unix与C.md
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,6 @@ Vim 有着悠久历史,它始于 1976 年的 Vi 编辑器,到现在还在不
<details>
<summary>拓展</summary>
### Git拓展
下面部分大多为理论部分,如果你不感兴趣或是头疼,就跳过这一部分吧😊
Expand Down Expand Up @@ -380,7 +379,6 @@ tar xJvf archive_name.tar.xz //解压.xz
<details>
<summary>拓展</summary>


### 这些是什么文件?

你可能会疑惑`.tar``.tar.gz``.tar.bz2``.tar.xz`这些文件到底是什么
Expand Down Expand Up @@ -438,17 +436,17 @@ GCC - GNU project C and C++ compiler
- `-c` 将源文件编译为目标文件(C 代码 -> 机器代码)
- `-o` 指定输出文件名
- `-std=...` 选择使用的 C 语言标准规范
- `-Wall` 开启所有可能的警告(建议开启
- `-Wall` 开启所有可能的警告(建议始终开启
- `-Wextra` 启用一些`-Wall`未启用的额外警告标志
- `-Wpedantic` 发出严格的 C 标准要求的所有警告;禁止编译器扩展。(建议开启
- `-Werror` 将所有警告视为错误(建议开启
- `-Wpedantic` 发出严格的 C 标准要求的所有警告;禁止编译器扩展。(建议始终开启
- `-Werror` 将所有警告视为错误(建议始终开启
- `-g` 生成调试信息(为调试器提供信息)
- `-O(g/1/2/3/s, ...)` 启用优化(需要调试程序时,建议使用`-Og`或不优化)
尝试在你的终端中(记得到你保存程序的文件里面)输入:
```bash
gcc -Wall -Wpedantic -Werror -Og -o xxx xxx.c
gcc -Wall -Wpedantic -Og -o xxx xxx.c
./xxx
```

Expand Down Expand Up @@ -489,10 +487,10 @@ TARGETS := $(SRCS:.c=)
all: $(TARGETS)

%: %.c
$(CC) $(CFLAGS) $< -o $@
$(CC) $(CFLAGS) $< -o $@

clean:
rm -f $(TARGETS)
rm -f $(TARGETS)

.PHONY: all clean
```
Expand Down
4 changes: 2 additions & 2 deletions components/CourseTable.vue
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ const courses = [
title: "0. 编程环境搭建",
links: {
slide: "https://e1psycongroo.github.io/NekoBytes-TheMissing/Lecture0/Lecture0/index.html",
recording: "",
recording: "https://www.bilibili.com/video/BV1rgxae2Eio/",
note: "/2.编程模块/2.1 NekoBytes-TheMissing/2.1.1 Book/2.开发环境配置",
},
},
Expand All @@ -79,7 +79,7 @@ const courses = [
title: "1. Unix 与 C",
links: {
slide: "https://e1psycongroo.github.io/NekoBytes-TheMissing/Lecture1/Lecture1/index.html",
recording: "",
recording: "https://www.bilibili.com/video/BV1rgxae2Eio/",
note: "/2.编程模块/2.1 NekoBytes-TheMissing/2.1.1 Book/3.Unix与C",
},
},
Expand Down

0 comments on commit 61b4218

Please sign in to comment.