vault backup: 2024-11-10 21:36:06

This commit is contained in:
zleyyij 2024-11-10 21:36:06 -07:00
parent a722cdd3b7
commit d6f47d0f95

View File

@ -51,7 +51,10 @@ Macro invocations are evaluated sequentially, and so if `DEBUG` was defined afte
> **5.** Suppose that a program consists of three source files - `main.c`, `f1.c`, and `f2.c`- Plus two header files, `f1.h` and `f2.h`. All three source files include `f1.h` but only `f1.c` and `f2.c` include `f2.h`. Write a makefile for this program, assuming that the compiler is `gcc` and that the executable file is to be named `demo`.
```makefile
demo: main.o f1.o f2.o
gcc -o demo main.o f1.o f2.o
main.o: main.c f1.h
gcc -c main.c
```
---