Chinaunix首页 | 论坛 | 博客
  • 博客访问: 1216668
  • 博文数量: 404
  • 博客积分: 10011
  • 博客等级: 上将
  • 技术积分: 5382
  • 用 户 组: 普通用户
  • 注册时间: 2008-09-03 16:29
文章存档

2010年(40)

2009年(140)

2008年(224)

我的朋友

分类: LINUX

2009-03-12 14:50:45

#
# Makefile for Linux application test example.
#
#---------------------------------------------------------------
# Linux application Makefile sample
# make          -- the optical output without debug info
# make clean    -- clean the object file(s)
# make install  -- install the execute file(s) to INSTALLDIR
#---------------------------------------------------------------
# History:
#   Program start, Embest Lusi 2008.8.3
CROSSDIR  = /usr/crosstool/gcc-3.4.5-glibc-2.3.6/arm-linux/bin
CROSS=arm-linux-
ifeq ($(BUILD_MODE), PARASOFT_CPPTEST)
CC ='/home/yuchaohua/Parasoft/cpptestscan' --cpptestscanOutputFile=ledtest.bdf --cpptestscanProjectName=MyProject $(CROSSDIR)/$(CROSS)gcc
LD='/home/yuchaohua/Parasoft/cpptestscan' --cpptestscanOutputFile=ledtest.bdf --cpptestscanProjectName=MyProject $(CROSSDIR)/$(CROSS)ld
else
CC = $(CROSS)gcc
AS = $(CROSS)as
LD = $(CROSS)ld
endif
INSTALLDIR = $(TFTPDIR)
LINUXDIR  = $(KERNELDIR)
#--------------------------------- /* execute file(s) */
TESTFILE  = led_test
#--------------------------------- /* object file(s) */
SRCFILE  = led_test.c
#--------------------------------- /* header file(s) */
TESTFILE_H =
 
CFLAGS  += -O2 -Wall
all:   $(TESTFILE)
$(TESTFILE):  $(SRCFILE) $(TESTFILE_H) Makefile
 $(CC) $(CFLAGS) -o $@
clean:
 rm -f $(TESTFILE)
 
install: $(TESTFILE)
 mkdir -p $(INSTALLDIR)
 cp --target-dir=$(INSTALLDIR) $(TESTFILE)
阅读(631) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~