#*********************************************************************************
|
# Copyright: (C) 2017 LingYun IoT Studio <www.iot-yun.com>
|
# All rights reserved.
|
#
|
# Filename: Makefile
|
# Description: This Makefile used to compile all the C source code file in current
|
# folder to respective excutable binary files.
|
#
|
# Version: 1.0.0(10/08/2011~)
|
# Author: Guo Wenxue <guowenxue@gmail.com>
|
# ChangeLog: 1, Release initial version on "11/11/2011 01:29:33 PM"
|
#
|
#********************************************************************************/
|
|
PWD=$(shell pwd)
|
INSTPATH=/tftp
|
|
CROSS_COMPILE=/opt/xtools/arm920t/bin/arm-linux-
|
export CC=${CROSS_COMPILE}gcc
|
|
CFLAGS+=-I`dirname ${PWD}`
|
|
SRCFILES = $(wildcard *.c)
|
BINARIES=$(SRCFILES:%.c=%)
|
|
all: binaries install
|
|
binaries: ${BINARIES}
|
@echo " Compile over"
|
|
%: %.c
|
$(CC) -o $@ $< $(CFLAGS)
|
|
install:
|
cp $(BINARIES) ${INSTPATH}
|
|
clean:
|
@rm -f version.h
|
@rm -f *.o $(BINARIES)
|
@rm -rf *.gdb *.a *.so *.elf*
|
|
distclean: clean
|
@rm -f tags cscope*
|
|
.PHONY: clean
|