包含与汇编程序 (GAS) 文件有关的 Makefile 的相对路径
假设我有以下项目结构:
<ASM_Project>/
├── <src>/
│ └── <boot>/
│ ├── boot.s
│ └── functions.s
└── Makefile
boot.s
:
_start:
jmp testing
.include "src/boot/functions.s"
testing:
Makefile
:
src/boot/boot.o: src/boot/boot.s src/boot/functions.s
as -o $@ $<
boot.s
和 functions.s 位于同一个文件夹中,但
.include "functions"
在这种情况下似乎不起作用:
Ernie@Sanderson:~/ASM_Project$ make
as -o src/boot/boot.o src/boot/boot.s
src/boot/boot.s: Assembler messages:
src/boot/boot.s:11: Error: can't open functions.s for reading: No such file or directory
make: *** [Makefile:23: src/boot/boot.o] Error 1
有没有办法实现它?
Let's say I've got the following project structure:
<ASM_Project>/
├── <src>/
│ └── <boot>/
│ ├── boot.s
│ └── functions.s
└── Makefile
boot.s
:
_start:
jmp testing
.include "src/boot/functions.s"
testing:
Makefile
:
src/boot/boot.o: src/boot/boot.s src/boot/functions.s
as -o $@ lt;
boot.s
and functions.s
are in the same folder and yet .include "functions"
doesn't seem to work in this case:
Ernie@Sanderson:~/ASM_Project$ make
as -o src/boot/boot.o src/boot/boot.s
src/boot/boot.s: Assembler messages:
src/boot/boot.s:11: Error: can't open functions.s for reading: No such file or directory
make: *** [Makefile:23: src/boot/boot.o] Error 1
Is there a way to pull it off though?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论