forked from len0rd/rockbox
Next step of Makefile tuning: * Use 'make' internal commands for printing messages. Saves build time especially on cygwin. * SILENT variable used in more places. * Bitmap build system uses one Makefille less.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11369 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
354770088e
commit
a796260a6b
40 changed files with 245 additions and 445 deletions
|
@ -38,13 +38,11 @@ all: $(OUTPUT)
|
|||
|
||||
ifndef SIMVER
|
||||
$(OBJDIR)/sudoku.elf: $(OBJS) $(LINKFILE) $(BITMAPLIBS)
|
||||
@echo "LD $(notdir $@)"
|
||||
@$(CC) $(GCCOPTS) -O -nostdlib -o $@ $(OBJS) -L$(BUILDDIR) -lplugin -lgcc \
|
||||
$(call PRINTS,LD $(@F))$(CC) $(GCCOPTS) -O -nostdlib -o $@ $(OBJS) -L$(BUILDDIR) -lplugin -lgcc \
|
||||
$(LINKBITMAPS) -T$(LINKFILE) -Wl,-Map,$(OBJDIR)/sudoku.map
|
||||
|
||||
$(OUTPUT): $(OBJDIR)/sudoku.elf
|
||||
@echo "OBJCOPY $(notdir $@)"
|
||||
@$(OC) -O binary $< $@
|
||||
$(call PRINTS,OBJCOPY $(@F))$(OC) -O binary $< $@
|
||||
else
|
||||
|
||||
ifeq ($(SIMVER), x11)
|
||||
|
@ -52,8 +50,7 @@ ifeq ($(SIMVER), x11)
|
|||
# This is the X11 simulator version
|
||||
|
||||
$(OUTPUT): $(OBJS)
|
||||
@echo "LD $(notdir $@)"
|
||||
@$(CC) $(CFLAGS) $(SHARED_FLAG) $(OBJS) -L$(BUILDDIR) -lplugin $(LINKBITMAPS) -o $@
|
||||
$(call PRINTS,LD $(@F))$(CC) $(CFLAGS) $(SHARED_FLAG) $(OBJS) -L$(BUILDDIR) -lplugin $(LINKBITMAPS) -o $@
|
||||
ifeq ($(findstring CYGWIN,$(UNAME)),CYGWIN)
|
||||
# 'x' must be kept or you'll have "Win32 error 5"
|
||||
# $ fgrep 5 /usr/include/w32api/winerror.h | head -1
|
||||
|
@ -68,8 +65,7 @@ ifeq ($(SIMVER), sdl)
|
|||
# This is the SDL simulator version
|
||||
|
||||
$(OUTPUT): $(OBJS)
|
||||
@echo "LD $(notdir $@)"
|
||||
@$(CC) $(CFLAGS) $(SHARED_FLAG) $(OBJS) -L$(BUILDDIR) -lplugin $(LINKBITMAPS) -o $@
|
||||
$(call PRINTS,LD $(@F))$(CC) $(CFLAGS) $(SHARED_FLAG) $(OBJS) -L$(BUILDDIR) -lplugin $(LINKBITMAPS) -o $@
|
||||
ifeq ($(findstring CYGWIN,$(UNAME)),CYGWIN)
|
||||
# 'x' must be kept or you'll have "Win32 error 5"
|
||||
# $ fgrep 5 /usr/include/w32api/winerror.h | head -1
|
||||
|
@ -85,9 +81,8 @@ DLLTOOLFLAGS = --export-all
|
|||
DLLWRAPFLAGS = -s --entry _DllMain@12 --target=i386-mingw32 -mno-cygwin
|
||||
|
||||
$(OUTPUT): $(OBJS)
|
||||
@echo "DLL $(notdir $@)"
|
||||
@$(DLLTOOL) $(DLLTOOLFLAGS) -z $(OBJDIR)/$*.def $(OBJS)
|
||||
@$(DLLWRAP) $(DLLWRAPFLAGS) --def $(OBJDIR)/$*.def $(OBJS) \
|
||||
$(call PRINTS,DLL $(@F))$(DLLTOOL) $(DLLTOOLFLAGS) -z $(OBJDIR)/$*.def $(OBJS)
|
||||
$(SILENT)$(DLLWRAP) $(DLLWRAPFLAGS) --def $(OBJDIR)/$*.def $(OBJS) \
|
||||
$(BUILDDIR)/libplugin.a $(BITMAPLIBS) -o $@
|
||||
ifeq ($(findstring CYGWIN,$(UNAME)),CYGWIN)
|
||||
# 'x' must be kept or you'll have "Win32 error 5"
|
||||
|
@ -106,13 +101,11 @@ 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 $(notdir $@)"
|
||||
@cat $< | $(CC) -DMEMORYSIZE=$(MEMORYSIZE) $(INCLUDES) $(TARGET) \
|
||||
$(call PRINTS,build $(@F))cat $< | $(CC) -DMEMORYSIZE=$(MEMORYSIZE) $(INCLUDES) $(TARGET) \
|
||||
$(DEFINES) -E -P - >$@
|
||||
|
||||
clean:
|
||||
@echo "cleaning sudoku"
|
||||
@rm -rf $(OBJDIR)/sudoku
|
||||
@rm -f $(OBJDIR)/sudoku.* $(DEPFILE)
|
||||
$(call PRINTS,cleaning sudoku)rm -rf $(OBJDIR)/sudoku
|
||||
$(SILENT)rm -f $(OBJDIR)/sudoku.* $(DEPFILE)
|
||||
|
||||
-include $(DEPFILE)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue