diff options
author | Jens Arnold <amiconn@rockbox.org> | 2006-10-27 21:48:06 +0000 |
---|---|---|
committer | Jens Arnold <amiconn@rockbox.org> | 2006-10-27 21:48:06 +0000 |
commit | a796260a6b9929f6aca844b4a788a2f55ef60d4b (patch) | |
tree | 21d3f983c2e618806cf6f160c67f7efd053061f0 /apps/plugins/sudoku/Makefile | |
parent | 354770088e87c3aa8720f462fe3ac8368d7de5b5 (diff) | |
download | rockbox-a796260a6b9929f6aca844b4a788a2f55ef60d4b.tar.gz rockbox-a796260a6b9929f6aca844b4a788a2f55ef60d4b.zip |
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
Diffstat (limited to 'apps/plugins/sudoku/Makefile')
-rw-r--r-- | apps/plugins/sudoku/Makefile | 25 |
1 files changed, 9 insertions, 16 deletions
diff --git a/apps/plugins/sudoku/Makefile b/apps/plugins/sudoku/Makefile index 7093de93c0..debd9fecc2 100644 --- a/apps/plugins/sudoku/Makefile +++ b/apps/plugins/sudoku/Makefile | |||
@@ -38,13 +38,11 @@ all: $(OUTPUT) | |||
38 | 38 | ||
39 | ifndef SIMVER | 39 | ifndef SIMVER |
40 | $(OBJDIR)/sudoku.elf: $(OBJS) $(LINKFILE) $(BITMAPLIBS) | 40 | $(OBJDIR)/sudoku.elf: $(OBJS) $(LINKFILE) $(BITMAPLIBS) |
41 | @echo "LD $(notdir $@)" | 41 | $(call PRINTS,LD $(@F))$(CC) $(GCCOPTS) -O -nostdlib -o $@ $(OBJS) -L$(BUILDDIR) -lplugin -lgcc \ |
42 | @$(CC) $(GCCOPTS) -O -nostdlib -o $@ $(OBJS) -L$(BUILDDIR) -lplugin -lgcc \ | ||
43 | $(LINKBITMAPS) -T$(LINKFILE) -Wl,-Map,$(OBJDIR)/sudoku.map | 42 | $(LINKBITMAPS) -T$(LINKFILE) -Wl,-Map,$(OBJDIR)/sudoku.map |
44 | 43 | ||
45 | $(OUTPUT): $(OBJDIR)/sudoku.elf | 44 | $(OUTPUT): $(OBJDIR)/sudoku.elf |
46 | @echo "OBJCOPY $(notdir $@)" | 45 | $(call PRINTS,OBJCOPY $(@F))$(OC) -O binary $< $@ |
47 | @$(OC) -O binary $< $@ | ||
48 | else | 46 | else |
49 | 47 | ||
50 | ifeq ($(SIMVER), x11) | 48 | ifeq ($(SIMVER), x11) |
@@ -52,8 +50,7 @@ ifeq ($(SIMVER), x11) | |||
52 | # This is the X11 simulator version | 50 | # This is the X11 simulator version |
53 | 51 | ||
54 | $(OUTPUT): $(OBJS) | 52 | $(OUTPUT): $(OBJS) |
55 | @echo "LD $(notdir $@)" | 53 | $(call PRINTS,LD $(@F))$(CC) $(CFLAGS) $(SHARED_FLAG) $(OBJS) -L$(BUILDDIR) -lplugin $(LINKBITMAPS) -o $@ |
56 | @$(CC) $(CFLAGS) $(SHARED_FLAG) $(OBJS) -L$(BUILDDIR) -lplugin $(LINKBITMAPS) -o $@ | ||
57 | ifeq ($(findstring CYGWIN,$(UNAME)),CYGWIN) | 54 | ifeq ($(findstring CYGWIN,$(UNAME)),CYGWIN) |
58 | # 'x' must be kept or you'll have "Win32 error 5" | 55 | # 'x' must be kept or you'll have "Win32 error 5" |
59 | # $ fgrep 5 /usr/include/w32api/winerror.h | head -1 | 56 | # $ fgrep 5 /usr/include/w32api/winerror.h | head -1 |
@@ -68,8 +65,7 @@ ifeq ($(SIMVER), sdl) | |||
68 | # This is the SDL simulator version | 65 | # This is the SDL simulator version |
69 | 66 | ||
70 | $(OUTPUT): $(OBJS) | 67 | $(OUTPUT): $(OBJS) |
71 | @echo "LD $(notdir $@)" | 68 | $(call PRINTS,LD $(@F))$(CC) $(CFLAGS) $(SHARED_FLAG) $(OBJS) -L$(BUILDDIR) -lplugin $(LINKBITMAPS) -o $@ |
72 | @$(CC) $(CFLAGS) $(SHARED_FLAG) $(OBJS) -L$(BUILDDIR) -lplugin $(LINKBITMAPS) -o $@ | ||
73 | ifeq ($(findstring CYGWIN,$(UNAME)),CYGWIN) | 69 | ifeq ($(findstring CYGWIN,$(UNAME)),CYGWIN) |
74 | # 'x' must be kept or you'll have "Win32 error 5" | 70 | # 'x' must be kept or you'll have "Win32 error 5" |
75 | # $ fgrep 5 /usr/include/w32api/winerror.h | head -1 | 71 | # $ fgrep 5 /usr/include/w32api/winerror.h | head -1 |
@@ -85,9 +81,8 @@ DLLTOOLFLAGS = --export-all | |||
85 | DLLWRAPFLAGS = -s --entry _DllMain@12 --target=i386-mingw32 -mno-cygwin | 81 | DLLWRAPFLAGS = -s --entry _DllMain@12 --target=i386-mingw32 -mno-cygwin |
86 | 82 | ||
87 | $(OUTPUT): $(OBJS) | 83 | $(OUTPUT): $(OBJS) |
88 | @echo "DLL $(notdir $@)" | 84 | $(call PRINTS,DLL $(@F))$(DLLTOOL) $(DLLTOOLFLAGS) -z $(OBJDIR)/$*.def $(OBJS) |
89 | @$(DLLTOOL) $(DLLTOOLFLAGS) -z $(OBJDIR)/$*.def $(OBJS) | 85 | $(SILENT)$(DLLWRAP) $(DLLWRAPFLAGS) --def $(OBJDIR)/$*.def $(OBJS) \ |
90 | @$(DLLWRAP) $(DLLWRAPFLAGS) --def $(OBJDIR)/$*.def $(OBJS) \ | ||
91 | $(BUILDDIR)/libplugin.a $(BITMAPLIBS) -o $@ | 86 | $(BUILDDIR)/libplugin.a $(BITMAPLIBS) -o $@ |
92 | ifeq ($(findstring CYGWIN,$(UNAME)),CYGWIN) | 87 | ifeq ($(findstring CYGWIN,$(UNAME)),CYGWIN) |
93 | # 'x' must be kept or you'll have "Win32 error 5" | 88 | # 'x' must be kept or you'll have "Win32 error 5" |
@@ -106,13 +101,11 @@ include $(TOOLSDIR)/make.inc | |||
106 | # MEMORYSIZE should be passed on to this makefile with the chosen memory size | 101 | # MEMORYSIZE should be passed on to this makefile with the chosen memory size |
107 | # given in number of MB | 102 | # given in number of MB |
108 | $(LINKFILE): $(LDS) | 103 | $(LINKFILE): $(LDS) |
109 | @echo "build $(notdir $@)" | 104 | $(call PRINTS,build $(@F))cat $< | $(CC) -DMEMORYSIZE=$(MEMORYSIZE) $(INCLUDES) $(TARGET) \ |
110 | @cat $< | $(CC) -DMEMORYSIZE=$(MEMORYSIZE) $(INCLUDES) $(TARGET) \ | ||
111 | $(DEFINES) -E -P - >$@ | 105 | $(DEFINES) -E -P - >$@ |
112 | 106 | ||
113 | clean: | 107 | clean: |
114 | @echo "cleaning sudoku" | 108 | $(call PRINTS,cleaning sudoku)rm -rf $(OBJDIR)/sudoku |
115 | @rm -rf $(OBJDIR)/sudoku | 109 | $(SILENT)rm -f $(OBJDIR)/sudoku.* $(DEPFILE) |
116 | @rm -f $(OBJDIR)/sudoku.* $(DEPFILE) | ||
117 | 110 | ||
118 | -include $(DEPFILE) | 111 | -include $(DEPFILE) |