#
# 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)
阅读(680) | 评论(0) | 转发(0) |