码迷,mamicode.com
首页 > 其他好文 > 详细

auto tool: make -2014-1210-0001

时间:2014-12-21 00:47:52      阅读:152      评论:0      收藏:0      [点我收藏+]

标签:linux   makefile   

/*
 *Author  : DavidLin        
 *Date    : 2014-12-10pm        
 *Email   : linpeng1577@163.com or linpeng1577@gmail.com        
 *world   : the city of SZ, in China        
 *Ver     : 000.000.001        
 *history :     editor      time            do        
 *          1)LinPeng       2014-12-10      created this file!        
 *          2)        
 */    

#**********************************************
# filename  : Makefile
# cmd list  : 
#		make
#		make debug/d
#		make asm/a
#               make clean/c             
#**********************************************

.PHONY: all clean
CC    = gcc
RM    = rm
SUDO  = sudo
DUMP  = objdump

LIB   = -lpthread

SRCS  = $(wildcard *.c)
OBJS  = 
EXES  = $(patsubst %.c, %, $(SRCS))
EXEC  = $(addprefix ./, $(EXES))
EXEC := $(strip $(EXEC))
LOGS  = $(addsuffix .S, $(EXEC))

all:
	$(CC)    -o    $(EXES)    $(SRCS)    $(LIB)
debug d:
	$(SUDO)  $(EXEC)
asm a:
	$(DUMP)  -S    $(EXES) >  $(LOGS)
clean c:
	$(RM)    -fr   $(OBJS)    $(EXES)    $(LOGS)

可用于如下链接code的Makefile
协议:如何实现一个最简单的通信协议(线程模拟)


auto tool: make -2014-1210-0001

标签:linux   makefile   

原文地址:http://blog.csdn.net/linpeng12358/article/details/42049371

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!