Build system: Get rid of the MOVEOBJ definition
Eliminate the MOVEOBJ definition from tools/Config.mk, Makefiles, and other locations. The MOVEOBJ definition was used to work around the case where the object output of a compile or assemble is in a different directory than the source file. The ZDS-II tools have no command line option to perform this move; MOVEOBJ handled the move as a post-compiler operation. MOVEOBJ is no longer needed because this the ez80 COMPILE and ASSEMBLE definitions now handle all of the object file movement cases.
This commit is contained in:
parent
75be4c5677
commit
d1a8a803e4
@ -188,11 +188,6 @@ define ASSEMBLE
|
||||
$(Q) "$(AS)" $(AFLAGS) $($(strip $1)_AFLAGS) ${shell echo $1 | sed -e "s/\//\\/g"}
|
||||
endef
|
||||
|
||||
define MOVEOBJ
|
||||
$(call MOVEFILE, "$1.obj", "$2$(DELIM)$1.obj")
|
||||
$(call MOVEFILE, "$1.lst", "$2$(DELIM)$1.lst")
|
||||
endef
|
||||
|
||||
define ARCHIVE
|
||||
for %%G in ($(2)) do ( "$(AR)" $(ARFLAGS) $1=-+%%G )
|
||||
endef
|
||||
@ -221,11 +216,6 @@ define ASSEMBLE
|
||||
$(Q) "$(AS)" $(AFLAGS) $($(strip $1)_AFLAGS) `cygpath -w "$1"`
|
||||
endef
|
||||
|
||||
define MOVEOBJ
|
||||
$(call MOVEFILE, "$1.obj", "$2$(DELIM)$1.obj")
|
||||
$(call MOVEFILE, "$1.lst", "$2$(DELIM)$1.lst")
|
||||
endef
|
||||
|
||||
define ARCHIVE
|
||||
for __obj in $(2) ; do \
|
||||
"$(AR)" $(ARFLAGS) $1=-+$$__obj \
|
||||
|
@ -31,7 +31,7 @@ define PREPROCESS
|
||||
$(Q) $(CPP) $(CPPFLAGS) $($(strip $(1))_CPPFLAGS) $(1) -o $(2)
|
||||
endef
|
||||
|
||||
# COMPILE, ASSEMBLE, MOVEOBJ
|
||||
# COMPILE, ASSEMBLE, and helpers
|
||||
#
|
||||
# The ZDS-II compiler and assembler both generate object files in the
|
||||
# current directory with the same name as the source file, but with the .obj
|
||||
@ -40,12 +40,10 @@ endef
|
||||
#
|
||||
# 1. If the foo.obj object belongs in a lower level directory (such as bin/),
|
||||
# then the relative path will be preface the object file name (such as
|
||||
# bin/foo.obj)). In this case, the build system will call MOVEOBJ to
|
||||
# move the objects in place and nothing special need be done here.
|
||||
# bin/foo.obj)).
|
||||
# 2. In other cases, the build system may decorate the object file name such
|
||||
# as a.b.c.foo.obj. This case is distinguished here by because does not
|
||||
# lie in a lower directory, but lies in the current directory and is
|
||||
# handled within COMPILE and ASSEMBLE.
|
||||
# lie in a lower directory, but lies in the current directory.
|
||||
|
||||
define RMOBJS
|
||||
$(call DELFILE, $(1))
|
||||
@ -56,7 +54,7 @@ endef
|
||||
ifeq ($(CONFIG_WINDOWS_NATIVE),y)
|
||||
|
||||
define CONDMOVE
|
||||
$(Q) if not exist $1 (move /Y $2 $3)
|
||||
$(Q) if not exist $1 if exist $2 (move /Y $2 $3)
|
||||
endef
|
||||
|
||||
define MVOBJS
|
||||
@ -80,7 +78,7 @@ endef
|
||||
else
|
||||
|
||||
define CONDMOVE
|
||||
$(Q) if [ ! -e $(1) ]; then mv -f $(2) $(3) ; fi
|
||||
$(Q) if [ ! -e $(1) && -e $(2) ]; then mv -f $(2) $(3) ; fi
|
||||
endef
|
||||
|
||||
define MVOBJS
|
||||
@ -103,9 +101,6 @@ endef
|
||||
|
||||
endif
|
||||
|
||||
define MOVEOBJ
|
||||
endef
|
||||
|
||||
# ARCHIVE will move a list of object files into the library. This is
|
||||
# complex because:
|
||||
#
|
||||
|
@ -216,12 +216,6 @@ define ASSEMBLE
|
||||
$(Q) "$(AS)" $(AFLAGS) $($(strip $1)_AFLAGS) ${shell echo $1 | sed -e "s/\//\\/g"}
|
||||
endef
|
||||
|
||||
define MOVEOBJ
|
||||
$(call MOVEFILE, "$1.obj", "$2$(DELIM)$1.obj")
|
||||
$(call MOVEFILE, "$1.lst", "$2$(DELIM)$1.lst")
|
||||
$(call MOVEFILE, "$1.src", "$2$(DELIM)$1.src")
|
||||
endef
|
||||
|
||||
define ARCHIVE
|
||||
for %%G in ($(2)) do ( "$(AR)" $(ARFLAGS) $1=-+%%G )
|
||||
endef
|
||||
@ -250,12 +244,6 @@ define ASSEMBLE
|
||||
$(Q) (wfile=`cygpath -w "$1"`; "$(AS)" $(AFLAGS) $($(strip $1)_AFLAGS) $$wfile)
|
||||
endef
|
||||
|
||||
define MOVEOBJ
|
||||
$(call MOVEFILE, "$1.obj", "$2$(DELIM)$1.obj")
|
||||
$(call MOVEFILE, "$1.lst", "$2$(DELIM)$1.lst")
|
||||
$(call MOVEFILE, "$1.src", "$2$(DELIM)$1.src")
|
||||
endef
|
||||
|
||||
define ARCHIVE
|
||||
for __obj in $(2) ; do \
|
||||
"$(AR)" $(ARFLAGS) $1=-+$$__obj \
|
||||
|
@ -216,18 +216,6 @@ define ASSEMBLE
|
||||
$(Q) "$(AS)" $(AFLAGS) $($(strip $1)_AFLAGS) ${shell echo $1 | sed -e "s/\//\\/g"}
|
||||
endef
|
||||
|
||||
define MOVEOBJ
|
||||
$(call MOVEFILE, "$1.obj", "$2$(DELIM)$1.obj")
|
||||
$(call MOVEFILE, "$1.lst", "$2$(DELIM)$1.lst")
|
||||
$(call MOVEFILE, "$1.src", "$2$(DELIM)$1.src")
|
||||
endef
|
||||
|
||||
define MOVEOBJ
|
||||
$(call MOVEFILE, "$1.obj", "$2$(DELIM)$1.obj")
|
||||
$(call MOVEFILE, "$1.lst", "$2$(DELIM)$1.lst")
|
||||
$(call MOVEFILE, "$1.src", "$2$(DELIM)$1.src")
|
||||
endef
|
||||
|
||||
define ARCHIVE
|
||||
for %%G in ($(2)) do ( "$(AR)" $(ARFLAGS) $1=-+%%G )
|
||||
endef
|
||||
|
@ -152,11 +152,9 @@ all: $(BIN)
|
||||
|
||||
$(AOBJS): $(BINDIR)$(DELIM)%$(OBJEXT): %.S
|
||||
$(call ASSEMBLE, $<, $@)
|
||||
$(call MOVEOBJ,$(patsubst $(BINDIR)$(DELIM)%$(OBJEXT),%,$@),$(BINDIR))
|
||||
|
||||
$(COBJS): $(BINDIR)$(DELIM)%$(OBJEXT): %.c
|
||||
$(call COMPILE, $<, $@)
|
||||
$(call MOVEOBJ,$(patsubst $(BINDIR)$(DELIM)%$(OBJEXT),%,$@),$(BINDIR))
|
||||
|
||||
# C library for the flat build
|
||||
|
||||
|
@ -229,11 +229,9 @@ gensources: gen1bppsources gen2bppsource gen4bppsource gen8bppsource gen16bppsou
|
||||
|
||||
$(AOBJS): $(BINDIR)$(DELIM)%$(OBJEXT): %.S
|
||||
$(call ASSEMBLE, $<, $@)
|
||||
$(call MOVEOBJ,$(patsubst $(BINDIR)$(DELIM)%$(OBJEXT),%,$@),$(BINDIR))
|
||||
|
||||
$(COBJS): $(BINDIR)$(DELIM)%$(OBJEXT): %.c
|
||||
$(call COMPILE, $<, $@)
|
||||
$(call MOVEOBJ,$(patsubst $(BINDIR)$(DELIM)%$(OBJEXT),%,$@),$(BINDIR))
|
||||
|
||||
# NX library for the flat build
|
||||
|
||||
|
@ -76,11 +76,9 @@ all: $(BIN)
|
||||
|
||||
$(AOBJS): $(BINDIR)$(DELIM)%$(OBJEXT): %.S
|
||||
$(call ASSEMBLE, $<, $@)
|
||||
$(call MOVEOBJ,$(patsubst $(BINDIR)$(DELIM)%$(OBJEXT),%,$@),$(BINDIR))
|
||||
|
||||
$(COBJS): $(BINDIR)$(DELIM)%$(OBJEXT): %.c
|
||||
$(call COMPILE, $<, $@)
|
||||
$(call MOVEOBJ,$(patsubst $(BINDIR)$(DELIM)%$(OBJEXT),%,$@),$(BINDIR))
|
||||
|
||||
# Memory manager for the flat build
|
||||
|
||||
|
@ -186,17 +186,6 @@ define INSTALL_LIB
|
||||
$(Q) install -m 0644 $1 $2
|
||||
endef
|
||||
|
||||
# MOVEOBJ - Default macro to move an object file to the correct location
|
||||
# Example: $(call MOVEOBJ, prefix, directory)
|
||||
#
|
||||
# This is only used in directories that keep object files in sub-directories.
|
||||
# Certain compilers (ZDS-II) always place the resulting files in the
|
||||
# directory where the compiler was invoked with no option to generate objects
|
||||
# in a different location.
|
||||
|
||||
define MOVEOBJ
|
||||
endef
|
||||
|
||||
# ARCHIVE - Add a list of files to an archive
|
||||
# Example: $(call ARCHIVE, archive-file, "file1 file2 file3 ...")
|
||||
#
|
||||
|
Loading…
Reference in New Issue
Block a user