Need pre-processor support for auto-generation of source file

git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@1312 42af7a65-404d-4744-a932-0658087f49c3
This commit is contained in:
patacongo
2008-11-26 18:59:14 +00:00
parent 6fec29f111
commit 9ebd20cef8
32 changed files with 206 additions and 5 deletions
+8 -1
View File
@@ -1,5 +1,5 @@
##############################################################################
# configs/olimex-strp711/ostest/Make.defs
# configs/us7032evb1/ostest/Make.defs
#
# Copyright (C) 2008 Gregory Nutt. All rights reserved.
# Author: Gregory Nutt <spudmonkey@racsa.co.cr>
@@ -51,6 +51,7 @@ ARCHSCRIPT = -T$(TOPDIR)/configs/$(CONFIG_ARCH_BOARD)/ostest/ld.script
CROSSDEV = sh-elf-
CC = $(CROSSDEV)gcc
CPP = $(CROSSDEV)gcc -E
LD = $(CROSSDEV)ld
AR = $(CROSSDEV)ar rcs
NM = $(CROSSDEV)nm
@@ -59,6 +60,7 @@ OBJDUMP = $(CROSSDEV)objdump
CFLAGS = $(ARCHWARNINGS) $(ARCHOPTIMIZATION) \
$(ARCHCPUFLAGS) $(ARCHINCLUDES) $(ARCHDEFINES) -pipe
CPPFLAGS = $(ARCHINCLUDES) $(ARCHDEFINES)
AFLAGS = $(CFLAGS) -D__ASSEMBLY__
OBJEXT = .o
@@ -69,6 +71,11 @@ ifeq ("${CONFIG_DEBUG}","y")
LDFLAGS += -g
endif
define PREPROCESS
@echo "CPP: $1->$2"
@$(CPP) $(CPPFLAGS) $1 -o $2
endef
define COMPILE
@echo "CC: $1"
@$(CC) -c $(CFLAGS) $1 -o $2