Add an 'export' target to the NuttX top-level Makefile
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@3771 42af7a65-404d-4744-a932-0658087f49c3
This commit is contained in:
parent
7b876c0369
commit
625d8a33bd
@ -187,6 +187,16 @@ nuttx$(EXEEXT): pass1.ihx nuttx.ihx
|
||||
@packihx nuttx.ihx > $(TOPDIR)/nuttx$(EXEEXT)
|
||||
@cp -f nuttx.map $(TOPDIR)/.
|
||||
|
||||
# This is part of the top-level export target
|
||||
|
||||
export_head: uboard/libboard$(LIBEXT) p_head$(OBJEXT)
|
||||
@if [ -d "$(EXPORT_DIR)/startup" ]; then \
|
||||
cp -f up_head$(OBJEXT) "$(EXPORT_DIR)/startup"; \
|
||||
else \
|
||||
echo "$(EXPORT_DIR)/startup does not exist"; \
|
||||
exit 1; \
|
||||
fi
|
||||
|
||||
# This target builds a test program to verify interrupt context switching. irqtest is
|
||||
# a PHONY target that just sets upt the up_irqtest build correctly
|
||||
|
||||
|
@ -55,7 +55,7 @@ else
|
||||
-I$(ARCH_SRCDIR)/$(ARCH_SUBDIR) -I$(TOPDIR)/sched
|
||||
endif
|
||||
|
||||
HEAD_AOBJ = $(HEAD_ASRC:.S=$(OBJEXT))
|
||||
HEAD_OBJ = $(HEAD_ASRC:.S=$(OBJEXT))
|
||||
|
||||
ASRCS = $(CHIP_ASRCS) $(CMN_ASRCS)
|
||||
AOBJS = $(ASRCS:.S=$(OBJEXT))
|
||||
@ -87,7 +87,7 @@ VPATH = chip:common:$(ARCH_SUBDIR)
|
||||
|
||||
all: $(HEAD_OBJ) libarch$(LIBEXT)
|
||||
|
||||
$(AOBJS) $(HEAD_AOBJ): %$(OBJEXT): %.S
|
||||
$(AOBJS) $(HEAD_OBJ): %$(OBJEXT): %.S
|
||||
$(call ASSEMBLE, $<, $@)
|
||||
|
||||
$(COBJS): %$(OBJEXT): %.c
|
||||
@ -101,9 +101,9 @@ libarch$(LIBEXT): $(OBJS)
|
||||
board/libboard$(LIBEXT):
|
||||
@$(MAKE) -C board TOPDIR="$(TOPDIR)" libboard$(LIBEXT) EXTRADEFINES=$(EXTRADEFINES)
|
||||
|
||||
nuttx: $(HEAD_AOBJ) board/libboard$(LIBEXT)
|
||||
nuttx: $(HEAD_OBJ) board/libboard$(LIBEXT)
|
||||
@echo "LD: nuttx"
|
||||
@$(LD) --entry=__start $(LDFLAGS) $(LIBPATHS) -o $(NUTTX)$(EXEEXT) $(HEAD_AOBJ) $(EXTRA_OBJS) \
|
||||
@$(LD) --entry=__start $(LDFLAGS) $(LIBPATHS) -o $(NUTTX)$(EXEEXT) $(HEAD_OBJ) $(EXTRA_OBJS) \
|
||||
--start-group $(LDLIBS) -lboard --end-group $(EXTRA_LIBS) $(LIBGCC)
|
||||
ifeq ($(CONFIG_BOOT_RUNFROMFLASH),y)
|
||||
@export flashloc=`$(OBJDUMP) --all-headers $(NUTTX)$(EXEEXT) | grep _eronly | cut -d' ' -f1`; \
|
||||
@ -119,6 +119,18 @@ endif
|
||||
mv $(NUTTX).flashimage $(NUTTX)$(EXEEXT); \
|
||||
fi
|
||||
|
||||
# This is part of the top-level export target
|
||||
|
||||
export_head: board/libboard$(LIBEXT) $(HEAD_OBJ)
|
||||
@if [ -d "$(EXPORT_DIR)/startup" ]; then \
|
||||
cp -f $(HEAD_OBJ) "$(EXPORT_DIR)/startup"; \
|
||||
else \
|
||||
echo "$(EXPORT_DIR)/startup does not exist"; \
|
||||
exit 1; \
|
||||
fi
|
||||
|
||||
# Dependencies
|
||||
|
||||
.depend: Makefile chip/Make.defs $(SRCS)
|
||||
@if [ -e board/Makefile ]; then \
|
||||
$(MAKE) -C board TOPDIR="$(TOPDIR)" depend ; \
|
||||
|
@ -64,7 +64,7 @@ CFLAGS += $(INCLUDES)
|
||||
CXXFLAGS += $(INCLUDES)
|
||||
AFLAGS += $(INCLUDES)
|
||||
|
||||
HEAD_AOBJ = $(HEAD_ASRC:.S=$(OBJEXT))
|
||||
HEAD_OBJ = $(HEAD_ASRC:.S=$(OBJEXT))
|
||||
|
||||
ASRCS = $(CHIP_ASRCS) $(CMN_ASRCS)
|
||||
AOBJS = $(ASRCS:.S=$(OBJEXT))
|
||||
@ -96,7 +96,7 @@ VPATH = chip:common:$(ARCH_SUBDIR)
|
||||
|
||||
all: $(HEAD_OBJ) libarch$(LIBEXT)
|
||||
|
||||
$(AOBJS) $(HEAD_AOBJ): %$(OBJEXT): %.S
|
||||
$(AOBJS) $(HEAD_OBJ): %$(OBJEXT): %.S
|
||||
$(call ASSEMBLE, $<, $@)
|
||||
|
||||
$(COBJS): %$(OBJEXT): %.c
|
||||
@ -110,9 +110,9 @@ libarch$(LIBEXT): $(OBJS)
|
||||
board/libboard$(LIBEXT):
|
||||
@$(MAKE) -C board TOPDIR="$(TOPDIR)" libboard$(LIBEXT) EXTRADEFINES=$(EXTRADEFINES)
|
||||
|
||||
nuttx: $(HEAD_AOBJ) board/libboard$(LIBEXT)
|
||||
nuttx: $(HEAD_OBJ) board/libboard$(LIBEXT)
|
||||
@echo "LD: nuttx"
|
||||
@$(LD) --entry=__start $(LDFLAGS) $(LIBPATHS) -o $(NUTTX)$(EXEEXT) $(HEAD_AOBJ) $(EXTRA_OBJS) \
|
||||
@$(LD) --entry=__start $(LDFLAGS) $(LIBPATHS) -o $(NUTTX)$(EXEEXT) $(HEAD_OBJ) $(EXTRA_OBJS) \
|
||||
--start-group $(LDLIBS) -lboard --end-group $(EXTRA_LIBS) $(LIBGCC)
|
||||
@$(NM) $(NUTTX)$(EXEEXT) | \
|
||||
grep -v '\(compiled\)\|\(\$(OBJEXT)$$\)\|\( [aUw] \)\|\(\.\.ng$$\)\|\(LASH[RL]DI\)' | \
|
||||
@ -123,6 +123,18 @@ nuttx: $(HEAD_AOBJ) board/libboard$(LIBEXT)
|
||||
mv $(NUTTX).flashimage $(NUTTX)$(EXEEXT); \
|
||||
fi
|
||||
|
||||
# This is part of the top-level export target
|
||||
|
||||
export_head: board/libboard$(LIBEXT) $(HEAD_OBJ)
|
||||
@if [ -d "$(EXPORT_DIR)/startup" ]; then \
|
||||
cp -f $(HEAD_OBJ) "$(EXPORT_DIR)/startup"; \
|
||||
else \
|
||||
echo "$(EXPORT_DIR)/startup does not exist"; \
|
||||
exit 1; \
|
||||
fi
|
||||
|
||||
# Dependencies
|
||||
|
||||
.depend: Makefile chip/Make.defs $(SRCS)
|
||||
@if [ -e board/Makefile ]; then \
|
||||
$(MAKE) -C board TOPDIR="$(TOPDIR)" depend ; \
|
||||
|
@ -56,7 +56,7 @@ else
|
||||
-I$(ARCH_SRCDIR)/$(ARCH_SUBDIR) -I$(TOPDIR)/sched
|
||||
endif
|
||||
|
||||
HEAD_AOBJ = $(HEAD_ASRC:.S=$(OBJEXT))
|
||||
HEAD_OBJ = $(HEAD_ASRC:.S=$(OBJEXT))
|
||||
|
||||
ASRCS = $(CHIP_ASRCS) $(CMN_ASRCS)
|
||||
AOBJS = $(ASRCS:.S=$(OBJEXT))
|
||||
@ -88,7 +88,7 @@ VPATH = chip:common:$(ARCH_SUBDIR)
|
||||
|
||||
all: $(HEAD_OBJ) libarch$(LIBEXT)
|
||||
|
||||
$(AOBJS) $(HEAD_AOBJ): %$(OBJEXT): %.S
|
||||
$(AOBJS) $(HEAD_OBJ): %$(OBJEXT): %.S
|
||||
$(call ASSEMBLE, $<, $@)
|
||||
|
||||
$(COBJS): %$(OBJEXT): %.c
|
||||
@ -102,9 +102,9 @@ libarch$(LIBEXT): $(OBJS)
|
||||
board/libboard$(LIBEXT):
|
||||
@$(MAKE) -C board TOPDIR="$(TOPDIR)" libboard$(LIBEXT) EXTRADEFINES=$(EXTRADEFINES)
|
||||
|
||||
nuttx: $(HEAD_AOBJ) board/libboard$(LIBEXT)
|
||||
nuttx: $(HEAD_OBJ) board/libboard$(LIBEXT)
|
||||
@echo "LD: nuttx"
|
||||
@$(LD) --entry=__start $(LDFLAGS) $(LIBPATHS) -o $(NUTTX)$(EXEEXT) $(HEAD_AOBJ) \
|
||||
@$(LD) --entry=__start $(LDFLAGS) $(LIBPATHS) -o $(NUTTX)$(EXEEXT) $(HEAD_OBJ) \
|
||||
--start-group $(LDLIBS) -lboard --end-group $(EXTRA_LIBS) $(LIBGCC)
|
||||
ifeq ($(CONFIG_BOOT_RUNFROMFLASH),y)
|
||||
@export flashloc=`$(OBJDUMP) --all-headers $(NUTTX)$(EXEEXT) | grep _eronly | cut -d' ' -f1`; \
|
||||
@ -120,6 +120,18 @@ endif
|
||||
mv $(NUTTX).flashimage $(NUTTX)$(EXEEXT); \
|
||||
fi
|
||||
|
||||
# This is part of the top-level export target
|
||||
|
||||
export_head: board/libboard$(LIBEXT) $(HEAD_OBJ)
|
||||
@if [ -d "$(EXPORT_DIR)/startup" ]; then \
|
||||
cp -f $(HEAD_OBJ) "$(EXPORT_DIR)/startup"; \
|
||||
else \
|
||||
echo "$(EXPORT_DIR)/startup does not exist"; \
|
||||
exit 1; \
|
||||
fi
|
||||
|
||||
# Dependencies
|
||||
|
||||
.depend: Makefile chip/Make.defs $(SRCS)
|
||||
@if [ -e board/Makefile ]; then \
|
||||
$(MAKE) -C board TOPDIR="$(TOPDIR)" depend ; \
|
||||
|
@ -53,7 +53,7 @@ else
|
||||
-I$(ARCH_SRCDIR)/$(ARCH_SUBDIR) -I$(TOPDIR)/sched
|
||||
endif
|
||||
|
||||
HEAD_AOBJ = $(HEAD_ASRC:.S=$(OBJEXT))
|
||||
HEAD_OBJ = $(HEAD_ASRC:.S=$(OBJEXT))
|
||||
|
||||
ASRCS = $(CHIP_ASRCS) $(CMN_ASRCS)
|
||||
AOBJS = $(ASRCS:.S=$(OBJEXT))
|
||||
@ -85,7 +85,7 @@ VPATH = chip:common:$(ARCH_SUBDIR)
|
||||
|
||||
all: $(HEAD_OBJ) libarch$(LIBEXT)
|
||||
|
||||
$(AOBJS) $(HEAD_AOBJ): %$(OBJEXT): %.S
|
||||
$(AOBJS) $(HEAD_OBJ): %$(OBJEXT): %.S
|
||||
$(call ASSEMBLE, $<, $@)
|
||||
|
||||
$(COBJS): %$(OBJEXT): %.c
|
||||
@ -99,9 +99,9 @@ libarch$(LIBEXT): $(OBJS)
|
||||
board/libboard$(LIBEXT):
|
||||
@$(MAKE) -C board TOPDIR="$(TOPDIR)" libboard$(LIBEXT) EXTRADEFINES=$(EXTRADEFINES)
|
||||
|
||||
nuttx: $(HEAD_AOBJ) board/libboard$(LIBEXT)
|
||||
nuttx: $(HEAD_OBJ) board/libboard$(LIBEXT)
|
||||
@echo "LD: nuttx"
|
||||
@$(LD) --entry=__start $(LDFLAGS) $(LIBPATHS) -o $(NUTTX)$(EXEEXT) $(HEAD_AOBJ) $(EXTRA_OBJS) \
|
||||
@$(LD) --entry=__start $(LDFLAGS) $(LIBPATHS) -o $(NUTTX)$(EXEEXT) $(HEAD_OBJ) $(EXTRA_OBJS) \
|
||||
--start-group $(LDLIBS) -lboard --end-group $(EXTRA_LIBS) $(LIBGCC)
|
||||
@$(NM) $(NUTTX)$(EXEEXT) | \
|
||||
grep -v '\(compiled\)\|\(\$(OBJEXT)$$\)\|\( [aUw] \)\|\(\.\.ng$$\)\|\(LASH[RL]DI\)' | \
|
||||
@ -112,6 +112,18 @@ nuttx: $(HEAD_AOBJ) board/libboard$(LIBEXT)
|
||||
mv $(NUTTX).flashimage $(NUTTX)$(EXEEXT); \
|
||||
fi
|
||||
|
||||
# This is part of the top-level export target
|
||||
|
||||
export_head: board/libboard$(LIBEXT) $(HEAD_OBJ)
|
||||
@if [ -d "$(EXPORT_DIR)/startup" ]; then \
|
||||
cp -f $(HEAD_OBJ) "$(EXPORT_DIR)/startup"; \
|
||||
else \
|
||||
echo "$(EXPORT_DIR)/startup does not exist"; \
|
||||
exit 1; \
|
||||
fi
|
||||
|
||||
# Dependencies
|
||||
|
||||
.depend: Makefile chip/Make.defs $(SRCS)
|
||||
@if [ -e board/Makefile ]; then \
|
||||
$(MAKE) -C board TOPDIR="$(TOPDIR)" depend ; \
|
||||
|
@ -78,6 +78,12 @@ nuttx$(EXEEXT):
|
||||
@$(OBJCOPY) -S -O binary $(TOPDIR)/$@ nuttx.img
|
||||
@cp nuttx.img $(TOPDIR)/kernel.img
|
||||
|
||||
# This is part of the top-level export target
|
||||
|
||||
export_head:
|
||||
|
||||
# Dependencies
|
||||
|
||||
.depend: Makefile $(SRCS)
|
||||
@$(MKDEP) $(CC) -- $(CFLAGS) -- $(SRCS) >Make.dep
|
||||
@touch $@
|
||||
|
@ -1,7 +1,7 @@
|
||||
############################################################################
|
||||
# arch/sh/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>
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
@ -39,7 +39,7 @@
|
||||
ARCH_SRCDIR = $(TOPDIR)/arch/$(CONFIG_ARCH)/src
|
||||
CFLAGS += -I$(ARCH_SRCDIR)/chip -I$(ARCH_SRCDIR)/common -I$(TOPDIR)/sched
|
||||
|
||||
HEAD_AOBJ = $(HEAD_ASRC:.S=$(OBJEXT))
|
||||
HEAD_OBJ = $(HEAD_ASRC:.S=$(OBJEXT))
|
||||
|
||||
ASRCS = $(CHIP_ASRCS) $(CMN_ASRCS)
|
||||
AOBJS = $(ASRCS:.S=$(OBJEXT))
|
||||
@ -65,7 +65,7 @@ VPATH = chip:common
|
||||
|
||||
all: $(HEAD_OBJ) libarch$(LIBEXT)
|
||||
|
||||
$(AOBJS) $(HEAD_AOBJ): %$(OBJEXT): %.S
|
||||
$(AOBJS) $(HEAD_OBJ): %$(OBJEXT): %.S
|
||||
$(call ASSEMBLE, $<, $@)
|
||||
|
||||
$(COBJS): %$(OBJEXT): %.c
|
||||
@ -79,9 +79,9 @@ libarch$(LIBEXT): $(OBJS)
|
||||
board/libboard$(LIBEXT):
|
||||
@$(MAKE) -C board TOPDIR="$(TOPDIR)" libboard$(LIBEXT) EXTRADEFINES=$(EXTRADEFINES)
|
||||
|
||||
nuttx: $(HEAD_AOBJ) board/libboard$(LIBEXT)
|
||||
nuttx: $(HEAD_OBJ) board/libboard$(LIBEXT)
|
||||
@echo "LD: nuttx"
|
||||
@$(LD) --entry=__start $(LDFLAGS) $(LDPATHES) -L$(BOARDDIR) -o $(TOPDIR)/$@ $(HEAD_AOBJ) \
|
||||
@$(LD) --entry=__start $(LDFLAGS) $(LDPATHES) -L$(BOARDDIR) -o $(TOPDIR)/$@ $(HEAD_OBJ) \
|
||||
--start-group $(LDLIBS) -lboard --end-group $(EXTRA_LIBS) $(LIBGCC)
|
||||
ifeq ($(CONFIG_BOOT_RUNFROMFLASH),y)
|
||||
@export flashloc=`$(OBJDUMP) --all-headers $(TOPDIR)/$@ | grep _eronly | cut -d' ' -f1`; \
|
||||
@ -97,6 +97,18 @@ endif
|
||||
mv $(TOPDIR)/$@.flashimage $(TOPDIR)/$@; \
|
||||
fi
|
||||
|
||||
# This is part of the top-level export target
|
||||
|
||||
export_head: board/libboard$(LIBEXT) $(HEAD_OBJ)
|
||||
@if [ -d "$(EXPORT_DIR)/startup" ]; then \
|
||||
cp -f $(HEAD_OBJ) "$(EXPORT_DIR)/startup"; \
|
||||
else \
|
||||
echo "$(EXPORT_DIR)/startup does not exist"; \
|
||||
exit 1; \
|
||||
fi
|
||||
|
||||
# Dependencies
|
||||
|
||||
.depend: Makefile chip/Make.defs $(SRCS)
|
||||
@if [ -e board/Makefile ]; then \
|
||||
$(MAKE) -C board TOPDIR="$(TOPDIR)" depend ; \
|
||||
|
@ -1,7 +1,7 @@
|
||||
############################################################################
|
||||
# arch/sim/src/Makefile
|
||||
#
|
||||
# Copyright (C) 2007, 2008 Gregory Nutt. All rights reserved.
|
||||
# Copyright (C) 2007, 2008, 2011 Gregory Nutt. All rights reserved.
|
||||
# Author: Gregory Nutt <spudmonkey@racsa.co.cr>
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
@ -154,6 +154,12 @@ nuttx$(EXEEXT): cleanrel nuttx.rel $(HOSTOBJS)
|
||||
sort > $(TOPDIR)/System.map
|
||||
@rm -f nuttx.rel
|
||||
|
||||
# This is part of the top-level export target
|
||||
|
||||
export_head:
|
||||
|
||||
# Dependencies
|
||||
|
||||
.depend: Makefile $(SRCS)
|
||||
@$(MKDEP) $(CC) -- $(CFLAGS) -- $(SRCS) >Make.dep
|
||||
@touch $@
|
||||
|
@ -53,7 +53,7 @@ else
|
||||
-I$(ARCH_SRCDIR)/$(ARCH_SUBDIR) -I$(TOPDIR)/sched
|
||||
endif
|
||||
|
||||
HEAD_AOBJ = $(HEAD_ASRC:.S=$(OBJEXT))
|
||||
HEAD_OBJ = $(HEAD_ASRC:.S=$(OBJEXT))
|
||||
|
||||
ASRCS = $(CHIP_ASRCS) $(CMN_ASRCS)
|
||||
AOBJS = $(ASRCS:.S=$(OBJEXT))
|
||||
@ -85,7 +85,7 @@ VPATH = chip:common:$(ARCH_SUBDIR)
|
||||
|
||||
all: $(HEAD_OBJ) libarch$(LIBEXT)
|
||||
|
||||
$(AOBJS) $(HEAD_AOBJ): %$(OBJEXT): %.S
|
||||
$(AOBJS) $(HEAD_OBJ): %$(OBJEXT): %.S
|
||||
$(call ASSEMBLE, $<, $@)
|
||||
|
||||
$(COBJS): %$(OBJEXT): %.c
|
||||
@ -99,9 +99,9 @@ libarch$(LIBEXT): $(OBJS)
|
||||
board/libboard$(LIBEXT):
|
||||
@$(MAKE) -C board TOPDIR="$(TOPDIR)" libboard$(LIBEXT) EXTRADEFINES=$(EXTRADEFINES)
|
||||
|
||||
nuttx$(EXEEXT): $(HEAD_AOBJ) board/libboard$(LIBEXT)
|
||||
nuttx$(EXEEXT): $(HEAD_OBJ) board/libboard$(LIBEXT)
|
||||
@echo "LD: nuttx$(EXEEXT)"
|
||||
@$(LD) --entry=__start $(LDFLAGS) $(LIBPATHS) -o $(NUTTX)$(EXEEXT) $(HEAD_AOBJ) $(EXTRA_OBJS) \
|
||||
@$(LD) --entry=__start $(LDFLAGS) $(LIBPATHS) -o $(NUTTX)$(EXEEXT) $(HEAD_OBJ) $(EXTRA_OBJS) \
|
||||
--start-group $(LDLIBS) -lboard --end-group $(EXTRA_LIBS) $(LIBGCC)
|
||||
ifeq ($(CONFIG_BOOT_RUNFROMFLASH),y)
|
||||
@export flashloc=`$(OBJDUMP) --all-headers $(NUTTX)$(EXEEXT) | grep _eronly | cut -d' ' -f1`; \
|
||||
@ -117,6 +117,18 @@ endif
|
||||
mv $(NUTTX).flashimage $(NUTTX)$(EXEEXT); \
|
||||
fi
|
||||
|
||||
# This is part of the top-level export target
|
||||
|
||||
export_head: board/libboard$(LIBEXT) $(HEAD_OBJ)
|
||||
@if [ -d "$(EXPORT_DIR)/startup" ]; then \
|
||||
cp -f $(HEAD_OBJ) "$(EXPORT_DIR)/startup"; \
|
||||
else \
|
||||
echo "$(EXPORT_DIR)/startup does not exist"; \
|
||||
exit 1; \
|
||||
fi
|
||||
|
||||
# Dependencies
|
||||
|
||||
.depend: Makefile chip/Make.defs $(SRCS)
|
||||
@if [ -e board/Makefile ]; then \
|
||||
$(MAKE) -C board TOPDIR="$(TOPDIR)" depend ; \
|
||||
|
@ -53,7 +53,7 @@ LDFLAGS = @"${shell cygpath -w $(ARCHSRCDIR)/nuttx.linkcmd}"
|
||||
endif
|
||||
|
||||
HEAD_ASRC = $(HEAD_SSRC:.S=$(ASMEXT))
|
||||
HEAD_AOBJ = $(HEAD_SSRC:.S=$(OBJEXT))
|
||||
HEAD_OBJ = $(HEAD_SSRC:.S=$(OBJEXT))
|
||||
|
||||
SSRCS = $(CHIP_SSRCS) $(CMN_SSRCS)
|
||||
ASRCS = $(SSRCS:.S=$(ASMEXT))
|
||||
@ -77,10 +77,10 @@ $(ASRCS) $(HEAD_ASRC): %$(ASMEXT): %.S
|
||||
@cat $@.tmp | sed -e "s/^#/;/g" > $@
|
||||
@rm $@.tmp
|
||||
|
||||
$(AOBJS) $(HEAD_AOBJ): %$(OBJEXT): %$(ASMEXT)
|
||||
$(AOBJS) $(HEAD_OBJ): %$(OBJEXT): %$(ASMEXT)
|
||||
$(call ASSEMBLE, $<, $@)
|
||||
else
|
||||
$(OBJS) $(HEAD_AOBJ): %$(OBJEXT): %.S
|
||||
$(OBJS) $(HEAD_OBJ): %$(OBJEXT): %.S
|
||||
$(call ASSEMBLE, $<, $@)
|
||||
endif
|
||||
|
||||
@ -99,7 +99,7 @@ ifeq ($(COMPILER),zneocc.exe)
|
||||
nuttx.linkcmd: $(LINKCMDTEMPLATE)
|
||||
@cp -f $(LINKCMDTEMPLATE) nuttx.linkcmd
|
||||
@echo "\"${shell cygpath -w $(TOPDIR)/nuttx}\"= \\" >>nuttx.linkcmd
|
||||
@echo " \"${shell cygpath -w $(ARCHSRCDIR)/$(HEAD_AOBJ)}\", \\" >>nuttx.linkcmd
|
||||
@echo " \"${shell cygpath -w $(ARCHSRCDIR)/$(HEAD_OBJ)}\", \\" >>nuttx.linkcmd
|
||||
@( for lib in $(LINKLIBS); do \
|
||||
echo " \"`cygpath -w $(TOPDIR)/$${lib}`\", \\" >>nuttx.linkcmd; \
|
||||
done ; )
|
||||
@ -110,7 +110,7 @@ else
|
||||
nuttx.linkcmd:
|
||||
endif
|
||||
|
||||
nuttx$(EXEEXT): $(HEAD_AOBJ) board/libboard$(LIBEXT) nuttx.linkcmd
|
||||
nuttx$(EXEEXT): $(HEAD_OBJ) board/libboard$(LIBEXT) nuttx.linkcmd
|
||||
@echo "LD: nuttx.hex"
|
||||
@$(LD) $(LDFLAGS)
|
||||
|
||||
@ -121,6 +121,18 @@ nuttx$(EXEEXT): $(HEAD_AOBJ) board/libboard$(LIBEXT) nuttx.linkcmd
|
||||
@$(MKDEP) --dep-path chip --dep-path common $(CC) -- $(CFLAGS) -- $(DEPSRCS) >Make.dep
|
||||
@touch $@
|
||||
|
||||
# This is part of the top-level export target
|
||||
|
||||
export_head: board/libboard$(LIBEXT) $(HEAD_OBJ)
|
||||
@if [ -d "$(EXPORT_DIR)/startup" ]; then \
|
||||
cp -f $(HEAD_OBJ) "$(EXPORT_DIR)/startup"; \
|
||||
else \
|
||||
echo "$(EXPORT_DIR)/startup does not exist"; \
|
||||
exit 1; \
|
||||
fi
|
||||
|
||||
# Dependencies
|
||||
|
||||
depend: .depend
|
||||
|
||||
clean:
|
||||
|
@ -1,7 +1,7 @@
|
||||
############################################################################
|
||||
# arch/z80/src/Makefile
|
||||
#
|
||||
# Copyright (C) 2007, 2008 Gregory Nutt. All rights reserved.
|
||||
# Copyright (C) 2007, 2008, 2011 Gregory Nutt. All rights reserved.
|
||||
# Author: Gregory Nutt <spudmonkey@racsa.co.cr>
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
|
@ -45,7 +45,7 @@ CPPFLAGS += -D__ASSEMBLY__
|
||||
|
||||
# There should be one head source (.asm file)
|
||||
|
||||
HEAD_AOBJ = $(HEAD_ASRC:$(ASMEXT)=$(OBJEXT))
|
||||
HEAD_OBJ = $(HEAD_ASRC:$(ASMEXT)=$(OBJEXT))
|
||||
|
||||
# Assembly sources and objects
|
||||
|
||||
@ -84,9 +84,9 @@ HEAP_BASE = ${shell ./mkhpbase.sh}
|
||||
############################################################################
|
||||
# Targets
|
||||
|
||||
all: $(HEAD_AOBJ) libarch$(LIBEXT)
|
||||
all: $(HEAD_OBJ) libarch$(LIBEXT)
|
||||
|
||||
$(AOBJS) $(HEAD_AOBJ): %$(OBJEXT): %$(ASMEXT)
|
||||
$(AOBJS) $(HEAD_OBJ): %$(OBJEXT): %$(ASMEXT)
|
||||
$(call ASSEMBLE, $<, $@)
|
||||
|
||||
$(COBJS): %$(OBJEXT): %.c
|
||||
@ -143,7 +143,7 @@ board/libboard$(LIBEXT):
|
||||
|
||||
# This target builds the final executable
|
||||
|
||||
pass1.ihx: up_mem.h asm_mem.h $(SDCCLIBDIR)/myz80.lib $(HEAD_AOBJ) board/libboard$(LIBEXT)
|
||||
pass1.ihx: up_mem.h asm_mem.h $(SDCCLIBDIR)/myz80.lib $(HEAD_OBJ) board/libboard$(LIBEXT)
|
||||
@echo "LD: pass1.ihx"
|
||||
@echo "--" >pass1.lnk # Non-interactive
|
||||
@echo "-k $(BOARDDIR)" >>pass1.lnk # Path to board library
|
||||
@ -168,15 +168,15 @@ endif
|
||||
@echo "-m" >>pass1.lnk # Generate a map file
|
||||
@echo "-j" >>pass1.lnk # Generate a symbol file
|
||||
@echo "pass1.ihx" >>pass1.lnk # Path to head object
|
||||
@echo "$(HEAD_AOBJ)" >>pass1.lnk # Path to head object
|
||||
@echo "$(HEAD_OBJ)" >>pass1.lnk # Path to head object
|
||||
@echo "-e" >>pass1.lnk # End of script
|
||||
@$(LD) -f pass1.lnk
|
||||
@rm -f up_mem.h asm_mem.h
|
||||
@rm -f up_allocateheap$(OBJEXT) $(HEAD_AOBJ) libarch$(LIBEXT)
|
||||
@rm -f up_allocateheap$(OBJEXT) $(HEAD_OBJ) libarch$(LIBEXT)
|
||||
@$(MAKE) TOPDIR="$(TOPDIR)" libarch$(LIBEXT)
|
||||
@$(MAKE) TOPDIR="$(TOPDIR)" $(HEAD_AOBJ)
|
||||
@$(MAKE) TOPDIR="$(TOPDIR)" $(HEAD_OBJ)
|
||||
|
||||
nuttx.ihx: up_mem.h asm_mem.h $(SDCCLIBDIR)/myz80.lib $(HEAD_AOBJ) board/libboard$(LIBEXT)
|
||||
nuttx.ihx: up_mem.h asm_mem.h $(SDCCLIBDIR)/myz80.lib $(HEAD_OBJ) board/libboard$(LIBEXT)
|
||||
@echo "LD: nuttx.ihx"
|
||||
@echo "--" >nuttx.lnk # Non-interactive
|
||||
@echo "-k $(BOARDDIR)" >>nuttx.lnk # Path to board library
|
||||
@ -201,7 +201,7 @@ endif
|
||||
@echo "-m" >>nuttx.lnk # Generate a map file
|
||||
@echo "-j" >>nuttx.lnk # Generate a symbol file
|
||||
@echo "nuttx.ihx" >>nuttx.lnk # Path to head object
|
||||
@echo "$(HEAD_AOBJ)" >>nuttx.lnk # Path to head object
|
||||
@echo "$(HEAD_OBJ)" >>nuttx.lnk # Path to head object
|
||||
@echo "-e" >>nuttx.lnk # End of script
|
||||
@$(LD) -f nuttx.lnk
|
||||
|
||||
@ -215,6 +215,16 @@ else
|
||||
@packihx nuttx.ihx > $(TOPDIR)/nuttx$(EXEEXT)
|
||||
endif
|
||||
|
||||
# This is part of the top-level export target
|
||||
|
||||
export_head: board/libboard$(LIBEXT) $(HEAD_OBJ)
|
||||
@if [ -d "$(EXPORT_DIR)/startup" ]; then \
|
||||
cp -f $(HEAD_OBJ) "$(EXPORT_DIR)/startup"; \
|
||||
else \
|
||||
echo "$(EXPORT_DIR)/startup does not exist"; \
|
||||
exit 1; \
|
||||
fi
|
||||
|
||||
# Build dependencies
|
||||
|
||||
.depend: Makefile up_mem.h asm_mem.h chip/Make.defs $(DEPSRCS)
|
||||
|
@ -47,9 +47,9 @@ LDFLAGS = @"${shell cygpath -w $(ARCHSRCDIR)/nuttx.linkcmd}"
|
||||
# Files and directories
|
||||
ifneq ($(HEAD_SSRC),)
|
||||
HEAD_GENSRC = $(HEAD_SSRC:.S=$(ASMEXT))
|
||||
HEAD_AOBJ = $(HEAD_SSRC:.S=$(OBJEXT))
|
||||
HEAD_OBJ = $(HEAD_SSRC:.S=$(OBJEXT))
|
||||
else
|
||||
HEAD_AOBJ = $(HEAD_ASRC:$(ASMEXT)=$(OBJEXT))
|
||||
HEAD_OBJ = $(HEAD_ASRC:$(ASMEXT)=$(OBJEXT))
|
||||
endif
|
||||
|
||||
SSRCS = $(CHIP_SSRCS) $(CMN_SSRCS)
|
||||
@ -76,7 +76,7 @@ $(HEAD_GENSRC) $(GENSRCS) : %$(ASMEXT): %.S
|
||||
@cat $@.tmp | sed -e "s/^#/;/g" > $@
|
||||
@rm $@.tmp
|
||||
|
||||
$(AOBJS) $(HEAD_AOBJ): %$(OBJEXT): %$(ASMEXT)
|
||||
$(AOBJS) $(HEAD_OBJ): %$(OBJEXT): %$(ASMEXT)
|
||||
$(call ASSEMBLE, $<, $@)
|
||||
|
||||
$(COBJS): %$(OBJEXT): %.c
|
||||
@ -93,7 +93,7 @@ board/libboard$(LIBEXT):
|
||||
nuttx.linkcmd: $(LINKCMDTEMPLATE)
|
||||
@cp -f $(LINKCMDTEMPLATE) nuttx.linkcmd
|
||||
@echo "\"${shell cygpath -w $(TOPDIR)/nuttx}\"= \\" >>nuttx.linkcmd
|
||||
@echo " \"${shell cygpath -w $(ARCHSRCDIR)/$(HEAD_AOBJ)}\", \\" >>nuttx.linkcmd
|
||||
@echo " \"${shell cygpath -w $(ARCHSRCDIR)/$(HEAD_OBJ)}\", \\" >>nuttx.linkcmd
|
||||
@( for lib in $(LINKLIBS); do \
|
||||
echo " \"`cygpath -w $(TOPDIR)/$${lib}`\", \\" >>nuttx.linkcmd; \
|
||||
done ; )
|
||||
@ -120,7 +120,7 @@ ifeq ($(CONFIG_ARCH_CHIP_EZ80F91),y)
|
||||
@echo " \"${shell cygpath -w $(ZDSZILOGLIBDIR)/uartf91$(LIBEXT)}\"" >>nuttx.linkcmd
|
||||
endif
|
||||
|
||||
nuttx$(EXEEXT): $(HEAD_AOBJ) board/libboard$(LIBEXT) nuttx.linkcmd
|
||||
nuttx$(EXEEXT): $(HEAD_OBJ) board/libboard$(LIBEXT) nuttx.linkcmd
|
||||
@echo "LD: nuttx.hex"
|
||||
@$(LD) $(LDFLAGS)
|
||||
|
||||
@ -131,6 +131,18 @@ nuttx$(EXEEXT): $(HEAD_AOBJ) board/libboard$(LIBEXT) nuttx.linkcmd
|
||||
@$(MKDEP) --dep-path chip --dep-path common $(CC) -- $(CFLAGS) -- $(DEPSRCS) >Make.dep
|
||||
@touch $@
|
||||
|
||||
# This is part of the top-level export target
|
||||
|
||||
export_head: board/libboard$(LIBEXT) $(HEAD_OBJ)
|
||||
@if [ -d "$(EXPORT_DIR)/startup" ]; then \
|
||||
cp -f $(HEAD_OBJ) "$(EXPORT_DIR)/startup"; \
|
||||
else \
|
||||
echo "$(EXPORT_DIR)/startup does not exist"; \
|
||||
exit 1; \
|
||||
fi
|
||||
|
||||
# Dependencies
|
||||
|
||||
depend: .depend
|
||||
|
||||
clean:
|
||||
|
Loading…
Reference in New Issue
Block a user