Speed up build process in general by using internal functions of make instead of spawning sub-shells where possible.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11307 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Jens Arnold 2006-10-22 00:21:57 +00:00
parent 5db8081822
commit 0cc8b7113c
14 changed files with 60 additions and 57 deletions

View file

@ -86,7 +86,7 @@ $(OBJDIR)/%.elf: $(OBJDIR)/%.o $(LINKFILE) $(BUILDDIR)/libplugin.a $(BITMAPLIBS)
$(SILENT)$(CC) $(GCCOPTS) -O -nostdlib -o $@ $< -L$(BUILDDIR) $(CODECLIBS) -lplugin $(LINKBITMAPS) -lgcc -T$(LINKFILE) -Wl,--gc-sections -Wl,-Map,$(OBJDIR)/$*.map
$(OBJDIR)/%.rock : $(OBJDIR)/%.elf
@echo "OBJCOPY "`basename $@`
@echo "OBJCOPY $(notdir $@)"
$(SILENT)$(OC) -O binary $< $@
else
@ -95,7 +95,7 @@ ifeq ($(SIMVER), x11)
# This is the X11 simulator version
$(OBJDIR)/%.rock : $(OBJDIR)/%.o $(BUILDDIR)/libplugin.a $(BITMAPLIBS)
@echo "LD "`basename $@`
@echo "LD $(notdir $@)"
$(SILENT)$(CC) $(CFLAGS) $(SHARED_FLAG) $< -L$(BUILDDIR) $(CODECLIBS) -lplugin $(LINKBITMAPS) -o $@
ifeq ($(findstring CYGWIN,$(UNAME)),CYGWIN)
# 'x' must be kept or you'll have "Win32 error 5"
@ -111,7 +111,7 @@ ifeq ($(SIMVER), sdl)
# This is the SDL simulator version
$(OBJDIR)/%.rock : $(OBJDIR)/%.o $(BUILDDIR)/libplugin.a $(BITMAPLIBS)
@echo "LD "`basename $@`
@echo "LD $(notdir $@)"
$(SILENT)$(CC) $(CFLAGS) $(SHARED_FLAG) $< -L$(BUILDDIR) $(CODECLIBS) -lplugin $(LINKBITMAPS) -o $@
ifeq ($(findstring CYGWIN,$(UNAME)),CYGWIN)
# 'x' must be kept or you'll have "Win32 error 5"
@ -128,7 +128,7 @@ DLLTOOLFLAGS = --export-all
DLLWRAPFLAGS = -s --entry _DllMain@12 --target=i386-mingw32 -mno-cygwin
$(OBJDIR)/%.rock : $(OBJDIR)/%.o $(BUILDDIR)/libplugin.a $(BITMAPLIBS)
@echo "DLL "`basename $@`
@echo "DLL $(notdir $@)"
$(SILENT)$(DLLTOOL) $(DLLTOOLFLAGS) -z $(OBJDIR)/$*.def $<
$(SILENT)$(DLLWRAP) $(DLLWRAPFLAGS) --def $(OBJDIR)/$*.def $< $(BUILDDIR)/libplugin.a $(BITMAPLIBS) \
$(patsubst -l%,$(BUILDDIR)/lib%.a,$(CODECLIBS)) -o $@

View file

@ -40,12 +40,12 @@ all: $(OUTPUT)
ifndef SIMVER
$(OBJDIR)/chessbox.elf: $(OBJS) $(LINKFILE) $(BITMAPLIBS)
@echo "LD "`basename $@`
@echo "LD $(notdir $@)"
@$(CC) $(GCCOPTS) -O -nostdlib -o $@ $(OBJS) -L$(BUILDDIR) -lplugin -lgcc \
$(LINKBITMAPS) -T$(LINKFILE) -Wl,-Map,$(OBJDIR)/chessbox.map
$(OUTPUT): $(OBJDIR)/chessbox.elf
@echo "OBJCOPY "`basename $@`
@echo "OBJCOPY $(notdir $@)"
@$(OC) -O binary $< $@
else
@ -87,7 +87,7 @@ DLLTOOLFLAGS = --export-all
DLLWRAPFLAGS = -s --entry _DllMain@12 --target=i386-mingw32 -mno-cygwin
$(OUTPUT): $(OBJS)
@echo "DLL "`basename $@`
@echo "DLL $(notdir $@)"
@$(DLLTOOL) $(DLLTOOLFLAGS) -z $(OBJDIR)/$*.def $(OBJS)
@$(DLLWRAP) $(DLLWRAPFLAGS) --def $(OBJDIR)/$*.def $(OBJS) \
$(BUILDDIR)/libplugin.a $(BITMAPLIBS) -o $@
@ -108,7 +108,7 @@ include $(TOOLSDIR)/make.inc
# MEMORYSIZE should be passed on to this makefile with the chosen memory size
# given in number of MB
$(LINKFILE): $(LDS)
@echo "build "`basename $@`
@echo "build $(notdir $@)"
@cat $< | $(CC) -DMEMORYSIZE=$(MEMORYSIZE) $(INCLUDES) $(TARGET) \
$(DEFINES) -E -P - >$@

View file

@ -31,12 +31,12 @@ all: $(OUTPUT)
ifndef SIMVER
$(OBJDIR)/databox.elf: $(OBJS) $(LINKFILE)
@echo "LD "`basename $@`
@echo "LD $(notdir $@)"
@$(CC) $(GCCOPTS) -O -nostdlib -o $@ $(OBJS) -L$(BUILDDIR) -lplugin -lgcc \
-T$(LINKFILE) -Wl,-Map,$(OBJDIR)/databox.map
$(OUTPUT): $(OBJDIR)/databox.elf
@echo "OBJCOPY "`basename $@`
@echo "OBJCOPY $(notdir $@)"
@$(OC) -O binary $< $@
else
@ -78,7 +78,7 @@ DLLTOOLFLAGS = --export-all
DLLWRAPFLAGS = -s --entry _DllMain@12 --target=i386-mingw32 -mno-cygwin
$(OUTPUT): $(OBJS)
@echo "DLL "`basename $@`
@echo "DLL $(notdir $@)"
@$(DLLTOOL) $(DLLTOOLFLAGS) -z $(OBJDIR)/$*.def $(OBJS)
@$(DLLWRAP) $(DLLWRAPFLAGS) --def $(OBJDIR)/$*.def $(OBJS) \
$(BUILDDIR)/libplugin.a -o $@
@ -99,7 +99,7 @@ include $(TOOLSDIR)/make.inc
# MEMORYSIZE should be passed on to this makefile with the chosen memory size
# given in number of MB
$(LINKFILE): $(LDS)
@echo "build "`basename $@`
@echo "build $(notdir $@)"
@cat $< | $(CC) -DMEMORYSIZE=$(MEMORYSIZE) $(INCLUDES) $(TARGET) \
$(DEFINES) -E -P - >$@

View file

@ -3,7 +3,10 @@
# $Id$
#
# $Log$
# Revision 1.6 2006/09/29 20:04:35 barrywardell
# Revision 1.7 2006/10/22 00:21:56 amiconn
# Speed up build process in general by using internal functions of make instead of spawning sub-shells where possible.
#
# Revision 1.6 2006-09-29 20:04:35 barrywardell
# Cleaner implementation of the recent OSX simulator build fix. No need to define SHARED_FLAG in each Makefile. Just have configure create it in the root Makefile instead.
#
# Revision 1.5 2006-09-29 16:15:08 barrywardell
@ -76,12 +79,12 @@ all: $(OUTPUT)
ifndef SIMVER
$(OBJDIR)/doom.elf: $(OBJS) $(LINKFILE)
@echo "LD "`basename $@`
@echo "LD $(notdir $@)"
@$(CC) $(GCCOPTS) $(LDFLAGS) -nostdlib -o $@ $(OBJS) -L$(BUILDDIR) -lplugin -lgcc\
-T$(LINKFILE) -Wl,-Map,$(OBJDIR)/doom.map
$(OUTPUT): $(OBJDIR)/doom.elf
@echo "OBJCOPY "`basename $@`
@echo "OBJCOPY $(notdir $@)"
@$(OC) -O binary $< $@
else
@ -123,7 +126,7 @@ DLLTOOLFLAGS = --export-all
DLLWRAPFLAGS = -s --entry _DllMain@12 --target=i386-mingw32 -mno-cygwin
$(OUTPUT): $(OBJS)
@echo "DLL "`basename $@`
@echo "DLL $(notdir $@)"
@$(DLLTOOL) $(DLLTOOLFLAGS) -z $(OBJDIR)/$*.def $(OBJS)
@$(DLLWRAP) $(DLLWRAPFLAGS) --def $(OBJDIR)/$*.def $(OBJS) \
$(BUILDDIR)/libplugin.a -o $@
@ -144,7 +147,7 @@ include $(TOOLSDIR)/make.inc
# MEMORYSIZE should be passed on to this makefile with the chosen memory size
# given in number of MB
$(LINKFILE): $(LDS)
@echo "build "`basename $@`
@echo "build $(notdir $@)"
@cat $< | $(CC) -DMEMORYSIZE=$(MEMORYSIZE) $(INCLUDES) $(TARGET) $(DEFINES) \
-E -P - >$@

View file

@ -34,12 +34,12 @@ all: $(OUTPUT)
ifndef SIMVER
$(OBJDIR)/mpegplayer.elf: $(OBJS) $(LINKFILE)
@echo "LD "`basename $@`
@echo "LD $(notdir $@)"
@$(CC) $(GCCOPTS) -O -nostdlib -o $@ $(OBJS) -L$(BUILDDIR) -lplugin -lgcc \
-T$(LINKFILE) -Wl,-Map,$(OBJDIR)/mpegplayer.map
$(OUTPUT): $(OBJDIR)/mpegplayer.elf
@echo "OBJCOPY "`basename $@`
@echo "OBJCOPY $(notdir $@)"
@$(OC) -O binary $< $@
else
@ -81,7 +81,7 @@ DLLTOOLFLAGS = --export-all
DLLWRAPFLAGS = -s --entry _DllMain@12 --target=i386-mingw32 -mno-cygwin
$(OUTPUT): $(OBJS)
@echo "DLL "`basename $@`
@echo "DLL $(notdir $@)"
@$(DLLTOOL) $(DLLTOOLFLAGS) -z $(OBJDIR)/$*.def $(OBJS)
@$(DLLWRAP) $(DLLWRAPFLAGS) --def $(OBJDIR)/$*.def $(OBJS) \
$(BUILDDIR)/libplugin.a -o $@
@ -102,7 +102,7 @@ include $(TOOLSDIR)/make.inc
# MEMORYSIZE should be passed on to this makefile with the chosen memory size
# given in number of MB
$(LINKFILE): $(LDS)
@echo "build "`basename $@`
@echo "build $(notdir $@)"
@cat $< | $(CC) -DMEMORYSIZE=$(MEMORYSIZE) $(INCLUDES) $(TARGET) \
$(DEFINES) -E -P - >$@

View file

@ -34,12 +34,12 @@ all: $(OUTPUT)
ifndef SIMVER
$(OBJDIR)/pacbox.elf: $(OBJS) $(LINKFILE)
@echo "LD "`basename $@`
@echo "LD $(notdir $@)"
@$(CC) $(GCCOPTS) -O -nostdlib -o $@ $(OBJS) -L$(BUILDDIR) -lplugin -lgcc \
-T$(LINKFILE) -Wl,-Map,$(OBJDIR)/pacbox.map
$(OUTPUT): $(OBJDIR)/pacbox.elf
@echo "OBJCOPY "`basename $@`
@echo "OBJCOPY $(notdir $@)"
@$(OC) -O binary $< $@
else
@ -81,7 +81,7 @@ DLLTOOLFLAGS = --export-all
DLLWRAPFLAGS = -s --entry _DllMain@12 --target=i386-mingw32 -mno-cygwin
$(OUTPUT): $(OBJS)
@echo "DLL "`basename $@`
@echo "DLL $(notdir $@)"
@$(DLLTOOL) $(DLLTOOLFLAGS) -z $(OBJDIR)/$*.def $(OBJS)
@$(DLLWRAP) $(DLLWRAPFLAGS) --def $(OBJDIR)/$*.def $(OBJS) \
$(BUILDDIR)/libplugin.a -o $@
@ -102,7 +102,7 @@ include $(TOOLSDIR)/make.inc
# MEMORYSIZE should be passed on to this makefile with the chosen memory size
# given in number of MB
$(LINKFILE): $(LDS)
@echo "build "`basename $@`
@echo "build $(notdir $@)"
@cat $< | $(CC) -DMEMORYSIZE=$(MEMORYSIZE) $(INCLUDES) $(TARGET) \
$(DEFINES) -E -P - >$@

View file

@ -47,12 +47,12 @@ all: $(OUTPUT)
ifndef SIMVER
$(OBJDIR)/rockboy.elf: $(OBJS) $(LINKFILE)
@echo "LD "`basename $@`
@echo "LD $(notdir $@)"
@$(CC) $(GCCOPTS) -O2 -nostdlib -o $@ $(OBJS) -L$(BUILDDIR) -lplugin -fast -lgcc \
-T$(LINKFILE) -Wl,-Map,$(OBJDIR)/rockboy.map
$(OUTPUT): $(OBJDIR)/rockboy.elf
@echo "OBJCOPY "`basename $@`
@echo "OBJCOPY $(notdir $@)"
@$(OC) -O binary $< $@
else
@ -94,7 +94,7 @@ DLLTOOLFLAGS = --export-all
DLLWRAPFLAGS = -s --entry _DllMain@12 --target=i386-mingw32 -mno-cygwin
$(OUTPUT): $(OBJS)
@echo "DLL "`basename $@`
@echo "DLL $(notdir $@)"
@$(DLLTOOL) $(DLLTOOLFLAGS) -z $(OBJDIR)/$*.def $(OBJS)
@$(DLLWRAP) $(DLLWRAPFLAGS) --def $(OBJDIR)/$*.def $(OBJS) \
$(BUILDDIR)/libplugin.a -o $@
@ -115,7 +115,7 @@ include $(TOOLSDIR)/make.inc
# MEMORYSIZE should be passed on to this makefile with the chosen memory size
# given in number of MB
$(LINKFILE): $(LDS)
@echo "build "`basename $@`
@echo "build $(notdir $@)"
@cat $< | $(CC) -DMEMORYSIZE=$(MEMORYSIZE) $(INCLUDES) $(TARGET) $(DEFINES) \
-E -P - >$@

View file

@ -31,12 +31,12 @@ all: $(OUTPUT)
ifndef SIMVER
$(OBJDIR)/searchengine.elf: $(OBJS) $(LINKFILE)
@echo "LD "`basename $@`
@echo "LD $(notdir $@)"
@$(CC) $(GCCOPTS) -O -nostdlib -o $@ $(OBJS) -L$(BUILDDIR) -lplugin -lgcc \
-T$(LINKFILE) -Wl,-Map,$(OBJDIR)/searchengine.map
$(OUTPUT): $(OBJDIR)/searchengine.elf
@echo "OBJCOPY "`basename $@`
@echo "OBJCOPY $(notdir $@)"
@$(OC) -O binary $< $@
else
@ -78,7 +78,7 @@ DLLTOOLFLAGS = --export-all
DLLWRAPFLAGS = -s --entry _DllMain@12 --target=i386-mingw32 -mno-cygwin
$(OUTPUT): $(OBJS)
@echo "DLL "`basename $@`
@echo "DLL $(notdir $@)"
@$(DLLTOOL) $(DLLTOOLFLAGS) -z $(OBJDIR)/$*.def $(OBJS)
@$(DLLWRAP) $(DLLWRAPFLAGS) --def $(OBJDIR)/$*.def $(OBJS) \
$(BUILDDIR)/libplugin.a -o $@
@ -99,7 +99,7 @@ include $(TOOLSDIR)/make.inc
# MEMORYSIZE should be passed on to this makefile with the chosen memory size
# given in number of MB
$(LINKFILE): $(LDS)
@echo "build "`basename $@`
@echo "build $(notdir $@)"
@cat $< | $(CC) -DMEMORYSIZE=$(MEMORYSIZE) $(INCLUDES) $(TARGET) \
$(DEFINES) -E -P - >$@

View file

@ -38,12 +38,12 @@ all: $(OUTPUT)
ifndef SIMVER
$(OBJDIR)/sudoku.elf: $(OBJS) $(LINKFILE) $(BITMAPLIBS)
@echo "LD "`basename $@`
@echo "LD $(notdir $@)"
@$(CC) $(GCCOPTS) -O -nostdlib -o $@ $(OBJS) -L$(BUILDDIR) -lplugin -lgcc \
$(LINKBITMAPS) -T$(LINKFILE) -Wl,-Map,$(OBJDIR)/sudoku.map
$(OUTPUT): $(OBJDIR)/sudoku.elf
@echo "OBJCOPY "`basename $@`
@echo "OBJCOPY $(notdir $@)"
@$(OC) -O binary $< $@
else
@ -85,7 +85,7 @@ DLLTOOLFLAGS = --export-all
DLLWRAPFLAGS = -s --entry _DllMain@12 --target=i386-mingw32 -mno-cygwin
$(OUTPUT): $(OBJS)
@echo "DLL "`basename $@`
@echo "DLL $(notdir $@)"
@$(DLLTOOL) $(DLLTOOLFLAGS) -z $(OBJDIR)/$*.def $(OBJS)
@$(DLLWRAP) $(DLLWRAPFLAGS) --def $(OBJDIR)/$*.def $(OBJS) \
$(BUILDDIR)/libplugin.a $(BITMAPLIBS) -o $@
@ -106,7 +106,7 @@ include $(TOOLSDIR)/make.inc
# MEMORYSIZE should be passed on to this makefile with the chosen memory size
# given in number of MB
$(LINKFILE): $(LDS)
@echo "build "`basename $@`
@echo "build $(notdir $@)"
@cat $< | $(CC) -DMEMORYSIZE=$(MEMORYSIZE) $(INCLUDES) $(TARGET) \
$(DEFINES) -E -P - >$@

View file

@ -43,12 +43,12 @@ all: $(OUTPUT)
ifndef SIMVER
$(OBJDIR)/zxbox.elf: $(OBJS) $(LINKFILE)
@echo "LD "`basename $@`
@echo "LD $(notdir $@)"
@$(CC) $(GCCOPTS) -O -nostdlib -o $@ $(OBJS) -L$(BUILDDIR) -lplugin -lgcc \
-T$(LINKFILE) -Wl,-Map,$(OBJDIR)/zxbox.map
$(OUTPUT): $(OBJDIR)/zxbox.elf
@echo "OBJCOPY "`basename $@`
@echo "OBJCOPY $(notdir $@)"
@$(OC) -O binary $< $@
else
@ -76,7 +76,7 @@ include $(TOOLSDIR)/make.inc
# MEMORYSIZE should be passed on to this makefile with the chosen memory size
# given in number of MB
$(LINKFILE): $(LDS)
@echo "build "`basename $@`
@echo "build $(notdir $@)"
@cat $< | $(CC) -DMEMORYSIZE=$(MEMORYSIZE) $(INCLUDES) $(TARGET) \
$(DEFINES) -E -P - >$@