makefile 调用其他makefile文件
2018-01-21 12:55
162 查看
|-- Makefile
|-- test1
| |-- Makefile
| |-- bin
| | `-- test
| |-- hello.o
| |-- include
| | `-- hello.h
| `-- src
| `-- hello.c
`-- test2
|-- Makefile
|-- bin
| `-- test
|-- hello.o
|-- include
| `-- hello.h
|-- obj
`-- src
`-- hello.c
根目录下的Makefile文件调用test2中的Makefile文件:
根目录下的Makefile文件
SUBDIR = ./test2
MAKE = make
subsystem:
cd $(SUBDIR) && $(MAKE)
test2中的Makefile文件:
all: ./bin/test
CC = gcc
INCLUDE = ./include
vpath %.c ./src
vpath %.h ./include
./bin/test: hello.o
$(CC) -o $@ $^
hello.o: hello.c hello.h
$(CC) -c $< -I$(INCLUDE)
.PHONY: clean
clean:
-rm *.o
相关文章推荐
- makefile 调用其他makefile文件
- keil 中如何调用其他文件的函数
- 网站调用其他域名的静态文件导致的跨域问题、CORS错误解决方法
- 头文件函数未声明,在其他文件中直接调用函数在编译阶段的结果
- C#自身包含其他应用程序(或者文件)并在运行时调用
- 【python】如何在某.py文件中调用其他.py内的函数
- dbm数据库源代码分析(17):Makefile文件和其他文件
- makefile 和shell文件相互调用
- 如何在某.py文件中调用其他.py内的函数
- java中调用其他文件(可执行程序,word,浏览器,bat……等)
- Makefile总述②文件命名、包含其他文件makefile、变量、重建重载、解析
- makefile 和shell文件相互调用
- 一个makefile调用多个makefile 文件示例
- Python 中调用其他文件的两种方法 input 和raw_input
- js调用其他js文件的函数,以及js加载过程
- PHP调用其他文件中的类
- makefile 调用其他makefile
- Java中调用本地的其他文件。运行,命令窗口
- 一个makefile调用多个makefile 文件示例
- 【转】在MFC程序中调用或打开其他文件方式