mirror of
https://github.com/apache/nuttx.git
synced 2026-06-05 15:58:59 +08:00
Pass __KERNEL__ define (or not) to all makes to handle small differences in user-/kernel-builds
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@3459 42af7a65-404d-4744-a932-0658087f49c3
This commit is contained in:
@@ -37,7 +37,7 @@
|
|||||||
|
|
||||||
CFLAGS += -I$(TOPDIR)/sched
|
CFLAGS += -I$(TOPDIR)/sched
|
||||||
ASFLAGS = -x -j -g -l -s -p
|
ASFLAGS = -x -j -g -l -s -p
|
||||||
CPPFLAGS = $(ARCHINCLUDES) $(ARCHDEFINES) -D__ASSEMBLY__
|
CPPFLAGS = $(ARCHINCLUDES) $(ARCHDEFINES) $(EXTRADEFINES) -D__ASSEMBLY__
|
||||||
|
|
||||||
SSRCS =
|
SSRCS =
|
||||||
ASRCS = $(SSRCS:.S=$(ASMEXT))
|
ASRCS = $(SSRCS:.S=$(ASMEXT))
|
||||||
@@ -165,7 +165,7 @@ $(SDCCLIBDIR)/libmysdcc.lib: $(SDCCLIBDIR)/libsdcc.lib
|
|||||||
# This builds the libboard library in the board/ subdirectory
|
# This builds the libboard library in the board/ subdirectory
|
||||||
|
|
||||||
board/libboard$(LIBEXT):
|
board/libboard$(LIBEXT):
|
||||||
$(MAKE) -C board TOPDIR=$(TOPDIR) libboard$(LIBEXT)
|
$(MAKE) -C board TOPDIR=$(TOPDIR) libboard$(LIBEXT) EXTRADEFINES=$(EXTRADEFINES)
|
||||||
|
|
||||||
# This target builds the final executable
|
# This target builds the final executable
|
||||||
|
|
||||||
@@ -194,7 +194,7 @@ up_irqtest.ihx: $(TESTOBJS)
|
|||||||
$(CC) $(LDFLAGS) -L. $(SDCCPATH) $(TESTLINKOBJS) $(TESTOBJS) $(TESTEXTRAOBJS) $(SDCCLIBS) -o $@
|
$(CC) $(LDFLAGS) -L. $(SDCCPATH) $(TESTLINKOBJS) $(TESTOBJS) $(TESTEXTRAOBJS) $(SDCCLIBS) -o $@
|
||||||
|
|
||||||
irqtest:
|
irqtest:
|
||||||
$(MAKE) TOPDIR=../../.. up_irqtest.ihx
|
@$(MAKE) TOPDIR=../../.. up_irqtest.ihx
|
||||||
|
|
||||||
# Build dependencies
|
# Build dependencies
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
############################################################################
|
############################################################################
|
||||||
# arch/arm/src/Makefile
|
# arch/arm/src/Makefile
|
||||||
#
|
#
|
||||||
# Copyright (C) 2007-2009 Gregory Nutt. All rights reserved.
|
# Copyright (C) 2007-2009, 2011 Gregory Nutt. All rights reserved.
|
||||||
# Author: Gregory Nutt <spudmonkey@racsa.co.cr>
|
# Author: Gregory Nutt <spudmonkey@racsa.co.cr>
|
||||||
#
|
#
|
||||||
# Redistribution and use in source and binary forms, with or without
|
# Redistribution and use in source and binary forms, with or without
|
||||||
@@ -99,7 +99,7 @@ libarch$(LIBEXT): $(OBJS)
|
|||||||
done ; )
|
done ; )
|
||||||
|
|
||||||
board/libboard$(LIBEXT):
|
board/libboard$(LIBEXT):
|
||||||
@$(MAKE) -C board TOPDIR="$(TOPDIR)" libboard$(LIBEXT)
|
@$(MAKE) -C board TOPDIR="$(TOPDIR)" libboard$(LIBEXT) EXTRADEFINES=$(EXTRADEFINES)
|
||||||
|
|
||||||
nuttx: $(HEAD_AOBJ) board/libboard$(LIBEXT)
|
nuttx: $(HEAD_AOBJ) board/libboard$(LIBEXT)
|
||||||
@echo "LD: nuttx"
|
@echo "LD: nuttx"
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
############################################################################
|
############################################################################
|
||||||
# arch/avr/src/Makefile
|
# arch/avr/src/Makefile
|
||||||
#
|
#
|
||||||
# Copyright (C) 2010 Gregory Nutt. All rights reserved.
|
# Copyright (C) 2010-2011 Gregory Nutt. All rights reserved.
|
||||||
# Author: Gregory Nutt <spudmonkey@racsa.co.cr>
|
# Author: Gregory Nutt <spudmonkey@racsa.co.cr>
|
||||||
#
|
#
|
||||||
# Redistribution and use in source and binary forms, with or without
|
# Redistribution and use in source and binary forms, with or without
|
||||||
@@ -102,7 +102,7 @@ libarch$(LIBEXT): $(OBJS)
|
|||||||
done ; )
|
done ; )
|
||||||
|
|
||||||
board/libboard$(LIBEXT):
|
board/libboard$(LIBEXT):
|
||||||
@$(MAKE) -C board TOPDIR="$(TOPDIR)" libboard$(LIBEXT)
|
@$(MAKE) -C board TOPDIR="$(TOPDIR)" libboard$(LIBEXT) EXTRADEFINES=$(EXTRADEFINES)
|
||||||
|
|
||||||
nuttx: $(HEAD_AOBJ) board/libboard$(LIBEXT)
|
nuttx: $(HEAD_AOBJ) board/libboard$(LIBEXT)
|
||||||
@echo "LD: nuttx"
|
@echo "LD: nuttx"
|
||||||
|
|||||||
@@ -100,7 +100,7 @@ libarch$(LIBEXT): $(OBJS)
|
|||||||
done ; )
|
done ; )
|
||||||
|
|
||||||
board/libboard$(LIBEXT):
|
board/libboard$(LIBEXT):
|
||||||
@$(MAKE) -C board TOPDIR="$(TOPDIR)" libboard$(LIBEXT)
|
@$(MAKE) -C board TOPDIR="$(TOPDIR)" libboard$(LIBEXT) EXTRADEFINES=$(EXTRADEFINES)
|
||||||
|
|
||||||
nuttx: $(HEAD_AOBJ) board/libboard$(LIBEXT)
|
nuttx: $(HEAD_AOBJ) board/libboard$(LIBEXT)
|
||||||
@echo "LD: nuttx"
|
@echo "LD: nuttx"
|
||||||
|
|||||||
@@ -77,7 +77,7 @@ libarch$(LIBEXT): $(OBJS)
|
|||||||
done ; )
|
done ; )
|
||||||
|
|
||||||
board/libboard$(LIBEXT):
|
board/libboard$(LIBEXT):
|
||||||
$(MAKE) -C board TOPDIR="$(TOPDIR)" libboard$(LIBEXT)
|
@$(MAKE) -C board TOPDIR="$(TOPDIR)" libboard$(LIBEXT) EXTRADEFINES=$(EXTRADEFINES)
|
||||||
|
|
||||||
nuttx: $(HEAD_AOBJ) board/libboard$(LIBEXT)
|
nuttx: $(HEAD_AOBJ) board/libboard$(LIBEXT)
|
||||||
@echo "LD: nuttx"
|
@echo "LD: nuttx"
|
||||||
|
|||||||
@@ -97,7 +97,7 @@ libarch$(LIBEXT): $(OBJS)
|
|||||||
done ; )
|
done ; )
|
||||||
|
|
||||||
board/libboard$(LIBEXT):
|
board/libboard$(LIBEXT):
|
||||||
@$(MAKE) -C board TOPDIR="$(TOPDIR)" libboard$(LIBEXT)
|
@$(MAKE) -C board TOPDIR="$(TOPDIR)" libboard$(LIBEXT) EXTRADEFINES=$(EXTRADEFINES)
|
||||||
|
|
||||||
nuttx$(EXEEXT): $(HEAD_AOBJ) board/libboard$(LIBEXT)
|
nuttx$(EXEEXT): $(HEAD_AOBJ) board/libboard$(LIBEXT)
|
||||||
@echo "LD: nuttx$(EXEEXT)"
|
@echo "LD: nuttx$(EXEEXT)"
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
############################################################################
|
############################################################################
|
||||||
# arch/z16/src/Makefile
|
# arch/z16/src/Makefile
|
||||||
#
|
#
|
||||||
# Copyright (C) 2008 Gregory Nutt. All rights reserved.
|
# Copyright (C) 2008, 2011 Gregory Nutt. All rights reserved.
|
||||||
# Author: Gregory Nutt <spudmonkey@racsa.co.cr>
|
# Author: Gregory Nutt <spudmonkey@racsa.co.cr>
|
||||||
#
|
#
|
||||||
# Redistribution and use in source and binary forms, with or without
|
# Redistribution and use in source and binary forms, with or without
|
||||||
@@ -46,7 +46,7 @@ WARCHSRCDIR = $(ARCHSRCDIR)
|
|||||||
USRINCLUDES = -I$(TOPDIR)/sched -I$(ARCHSRCDIR) -I$(ARCHSRCDIR)/common
|
USRINCLUDES = -I$(TOPDIR)/sched -I$(ARCHSRCDIR) -I$(ARCHSRCDIR)/common
|
||||||
endif
|
endif
|
||||||
INCLUDES = $(ARCHSTDINCLUDES) $(USRINCLUDES)
|
INCLUDES = $(ARCHSTDINCLUDES) $(USRINCLUDES)
|
||||||
CFLAGS = $(ARCHWARNINGS) $(ARCHOPTIMIZATION) $(ARCHCPUFLAGS) $(INCLUDES) $(ARCHDEFINES)
|
CFLAGS = $(ARCHWARNINGS) $(ARCHOPTIMIZATION) $(ARCHCPUFLAGS) $(INCLUDES) $(ARCHDEFINES) $(EXTRADEFINES)
|
||||||
CPPFLAGS += -I$(ARCHSRCDIR)
|
CPPFLAGS += -I$(ARCHSRCDIR)
|
||||||
ifeq ($(COMPILER),zneocc.exe)
|
ifeq ($(COMPILER),zneocc.exe)
|
||||||
LDFLAGS = @"${shell cygpath -w $(ARCHSRCDIR)/nuttx.linkcmd}"
|
LDFLAGS = @"${shell cygpath -w $(ARCHSRCDIR)/nuttx.linkcmd}"
|
||||||
@@ -93,7 +93,7 @@ libarch$(LIBEXT): $(OBJS)
|
|||||||
done ; )
|
done ; )
|
||||||
|
|
||||||
board/libboard$(LIBEXT):
|
board/libboard$(LIBEXT):
|
||||||
@$(MAKE) -C board TOPDIR="$(TOPDIR)" libboard$(LIBEXT)
|
@$(MAKE) -C board TOPDIR="$(TOPDIR)" libboard$(LIBEXT) EXTRADEFINES=$(EXTRADEFINES)
|
||||||
|
|
||||||
ifeq ($(COMPILER),zneocc.exe)
|
ifeq ($(COMPILER),zneocc.exe)
|
||||||
nuttx.linkcmd: $(LINKCMDTEMPLATE)
|
nuttx.linkcmd: $(LINKCMDTEMPLATE)
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
############################################################################
|
############################################################################
|
||||||
# arch/z80/src/Makefile.sdcc
|
# arch/z80/src/Makefile.sdcc
|
||||||
#
|
#
|
||||||
# Copyright (C) 2008 Gregory Nutt. All rights reserved.
|
# Copyright (C) 2008, 2011 Gregory Nutt. All rights reserved.
|
||||||
# Author: Gregory Nutt <spudmonkey@racsa.co.cr>
|
# Author: Gregory Nutt <spudmonkey@racsa.co.cr>
|
||||||
#
|
#
|
||||||
# Redistribution and use in source and binary forms, with or without
|
# Redistribution and use in source and binary forms, with or without
|
||||||
@@ -139,7 +139,7 @@ libarch$(LIBEXT): up_mem.h asm_mem.h $(OBJS)
|
|||||||
# This builds the libboard library in the board/ subdirectory
|
# This builds the libboard library in the board/ subdirectory
|
||||||
|
|
||||||
board/libboard$(LIBEXT):
|
board/libboard$(LIBEXT):
|
||||||
$(MAKE) -C board TOPDIR="$(TOPDIR)" libboard$(LIBEXT)
|
@$(MAKE) -C board TOPDIR="$(TOPDIR)" libboard$(LIBEXT) EXTRADEFINES=$(EXTRADEFINES)
|
||||||
|
|
||||||
# This target builds the final executable
|
# This target builds the final executable
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
############################################################################
|
############################################################################
|
||||||
# arch/z16/src/Makefile
|
# arch/z16/src/Makefile
|
||||||
#
|
#
|
||||||
# Copyright (C) 2008 Gregory Nutt. All rights reserved.
|
# Copyright (C) 2008, 2011 Gregory Nutt. All rights reserved.
|
||||||
# Author: Gregory Nutt <spudmonkey@racsa.co.cr>
|
# Author: Gregory Nutt <spudmonkey@racsa.co.cr>
|
||||||
#
|
#
|
||||||
# Redistribution and use in source and binary forms, with or without
|
# Redistribution and use in source and binary forms, with or without
|
||||||
@@ -39,7 +39,7 @@ ARCHSRCDIR = $(TOPDIR)/arch/$(CONFIG_ARCH)/src
|
|||||||
WARCHSRCDIR = ${shell cygpath -w $(ARCHSRCDIR)}
|
WARCHSRCDIR = ${shell cygpath -w $(ARCHSRCDIR)}
|
||||||
USRINCLUDES = -usrinc:'.;$(WTOPDIR)\sched;$(WARCHSRCDIR);$(WARCHSRCDIR)\common'
|
USRINCLUDES = -usrinc:'.;$(WTOPDIR)\sched;$(WARCHSRCDIR);$(WARCHSRCDIR)\common'
|
||||||
INCLUDES = $(ARCHSTDINCLUDES) $(USRINCLUDES)
|
INCLUDES = $(ARCHSTDINCLUDES) $(USRINCLUDES)
|
||||||
CFLAGS = $(ARCHWARNINGS) $(ARCHOPTIMIZATION) $(ARCHCPUFLAGS) $(INCLUDES) $(ARCHDEFINES)
|
CFLAGS = $(ARCHWARNINGS) $(ARCHOPTIMIZATION) $(ARCHCPUFLAGS) $(INCLUDES) $(ARCHDEFINES) $(EXTRADEFINES)
|
||||||
CPPFLAGS += -I$(ARCHSRCDIR) -I$(ZDSSTDINCDIR) -I$(ZDSZILOGINCDIR)
|
CPPFLAGS += -I$(ARCHSRCDIR) -I$(ZDSSTDINCDIR) -I$(ZDSZILOGINCDIR)
|
||||||
LDFLAGS = @"${shell cygpath -w $(ARCHSRCDIR)/nuttx.linkcmd}"
|
LDFLAGS = @"${shell cygpath -w $(ARCHSRCDIR)/nuttx.linkcmd}"
|
||||||
|
|
||||||
@@ -88,7 +88,7 @@ libarch$(LIBEXT): $(OBJS)
|
|||||||
done ; )
|
done ; )
|
||||||
|
|
||||||
board/libboard$(LIBEXT):
|
board/libboard$(LIBEXT):
|
||||||
@$(MAKE) -C board TOPDIR="$(TOPDIR)" libboard$(LIBEXT)
|
@$(MAKE) -C board TOPDIR="$(TOPDIR)" libboard$(LIBEXT) EXTRADEFINES=$(EXTRADEFINES)
|
||||||
|
|
||||||
nuttx.linkcmd: $(LINKCMDTEMPLATE)
|
nuttx.linkcmd: $(LINKCMDTEMPLATE)
|
||||||
@cp -f $(LINKCMDTEMPLATE) nuttx.linkcmd
|
@cp -f $(LINKCMDTEMPLATE) nuttx.linkcmd
|
||||||
|
|||||||
Reference in New Issue
Block a user