build makefile for my coding!!

来源:互联网 发布:知彼网络 编辑:程序博客网 时间:2024/05/23 12:58
I learn how to build makefile from below:
http://www.chinaunix.net/old_jh/23/408225.html
http://blog.chinaunix.net/uid-23089249-id-2855999.html


This is my first makefile demo!!It's so simple and crube, but i will make if better gradually!!

It's direction:
warrior@warrior:~/CreazyCode/Cproject/test$ ls
demo.c  demo.h  main.c  main.h  makefile

And it's content:
#makefile demo V1.0
#author: warrior
#mail:675979646@qq.com
#date:2015/3/21

CC          := gcc
CFLAGS      := -c -g  -W -Wall
DIR         := ./

SOURCES     := $(shell ls *.c) 
OBJS        := $(patsubst %.c,%.o,$(SOURCES)) 
TARGET      := target

${TARGET} : ${OBJS} 
${CC} ${CFLAGS} -o $@ $^   

%.o : %.c
$(CC)  ${CFLAGS} -o $@ $<


.PHONY : clean
clean :
-rm -f *.o target



<script>window._bd_share_config={"common":{"bdSnsKey":{},"bdText":"","bdMini":"2","bdMiniList":false,"bdPic":"","bdStyle":"0","bdSize":"16"},"share":{}};with(document)0[(getElementsByTagName('head')[0]||body).appendChild(createElement('script')).src='http://bdimg.share.baidu.com/static/api/js/share.js?v=89860593.js?cdnversion='+~(-new Date()/36e5)];</script>
阅读(35) | 评论(0) | 转发(0) |
0

上一篇:没有了

下一篇:My understand of "iptables"

相关热门文章
  • linux 常见服务端口
  • xmanager 2.0 for linux配置
  • 【ROOTFS搭建】busybox的httpd...
  • openwrt中luci学习笔记
  • 什么是shell
  • linux dhcp peizhi roc
  • 关于Unix文件的软链接
  • 求教这个命令什么意思,我是新...
  • sed -e "/grep/d" 是什么意思...
  • 谁能够帮我解决LINUX 2.6 10...
给主人留下些什么吧!~~
原创粉丝点击