小编Joe*_*Joe的帖子

Makefile:make运行命令

这是我的 makefile。我知道有一种更短的方法可以写出来,但我有一个关于如何运行它的问题。我的硬件说我必须使用命令: make run --- 该命令应该导致可执行文件使用文件重定向来运行以读取输入文件数据。

我该如何设置呢?

我也知道 gcc 应该是选项卡式的。

test:  main.o sum.o stack.o bSearch.o database.o db.o set.o parse.o bubble.o
    gcc -o object main.o sum.o stack.o bSearch.o db.o set.o parse.o bubble.o

main.o: main.c sum.h
gcc -c main.c

sum.o: sum.c sum.h
    gcc -c sum.c

stack.o: stack.c stack.h
    gcc -c stack.c

bSearch.o: bSearch.c defs.h sortAndsearch.h
    gcc -c bSearch.c

database.o: database.c defs.h parse.h
    gcc -c database.c

db.o: db.c defs.h
    gcc -c db.c

set.o: set.c set.h db.h
    gcc -c set.c

parse.o: parse.c parse.h
    gcc …
Run Code Online (Sandbox Code Playgroud)

c makefile

0
推荐指数
1
解决办法
1万
查看次数

标签 统计

c ×1

makefile ×1