ENVDIR = (SOME PLACE)/ws # the project environment
include $(ENVDIR)/tpmakeenv # predefinition by the environment
# directory for output files
OS_OBJDIR = (SOME PLACE)/lib
# directory for source files
OS_SRCDIR = ../src/libjpeg
# TARGET LIB FILE
OS_TARGET = $(OS_OBJDIR)/libjpeg.a
# object files
OS_COBJECTS = $(OS_SRCDIR)/cdjpeg.o /
... # other JPEG source files
$(OS_SRCDIR)/djpeg_intf.o # the last JPEG source file
all: $(OS_TARGET) # the main task(s), it depends on the task OS_COBJECTS
$(OS_COBJECTS):%.o:%.c # associate .o files to .c files with same base name.
$(OS_CC) -c $(OS_CFLAGS) $(OPENMAX_MACRO_SWITCH) $(OS_LOCAL_CFLAGS) $(OS_INCLUDES) $(OS_LOCAL_INCLUDE) $< -o $@
$(OS_TARGET):$(OS_COBJECTS)
$(OS_AR) $(OS_AR_OPT) $@ $^
.PHONY:
clean:
$(OS_RM) $(OS_COBJECTS) $(OS_TARGET)
分享到:
相关推荐
对如何写makefile进行了详细的讲解和说明,是linux平台下开发人员手边必备的工具书。
How to Write makefile pdf下载
how to write makefile 网上很流行的makefile详细教程
教你如何编写GNU makefile 文件
Chapter 1: How to write a Simple Makefile Chapter 2: Rules Chapter 3: Variables and Macros Chapter 4: Functions Chapter 5: Commands Part II. Advanced and Specialized Topics Chapter 6: Managing Large ...
How to Write makefile.pdf,学习Makefile的经典
how to make makefile
本文详细描述如何书写makefile,对初学者很实用
在unix/linux下的软件编译,makefile关系到整个工程的编译规则。一个工程中的源文件不计其数,其按类型、功能、模块分别放在若干个目录中,makefile定义了一系列的规则来指定哪些文件需要先编译,哪些后编译,哪些重...
跟我一起写Makefile (PDF重制版) 简介 《跟我一起写Makefile》是 发表在其CSDN博客上的系列文章。...$ git clone https://github.com/seisman/how-to-write-makefile.git 安装依赖: $ pip install -r
How to write Makefile
On a good description of how to use the makefile is makefile to learn very good things Makefile的规则: target:prerequisities command target可以是obj文件 ,也可以是目标文件 ,也可以是lable 标签 ...
how to makefile
ubuntu系统生成静态库.a的makefile文件
什么是makefile?要作一个好的和professional的程序员,makefile还是要懂。这就好像现在有这么多的HTML的编辑器,但如果你想成为一个专业人士,你还是要了解HTML的标识的含义。特别在Unix下的软件编译,你就不能不...