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
|
@ -67,27 +67,32 @@ $(DEPFILE): $(BITMAPLIBS)
|
|||
dep: $(DEPFILE)
|
||||
|
||||
$(BUILDDIR)/credits.raw: $(DOCSDIR)/CREDITS
|
||||
@echo "create credits.raw"
|
||||
$(SILENT)perl credits.pl < $< > $@
|
||||
$(call PRINTS,create credits.raw)perl credits.pl < $< > $@
|
||||
|
||||
$(OBJDIR)/credits.o: credits.c $(BUILDDIR)/credits.raw
|
||||
$(SILENT)mkdir -p $(dir $@)
|
||||
@echo "CC $<"
|
||||
$(SILENT)$(CC) $(CFLAGS) -I$(OBJDIR) -c $< -o $@
|
||||
$(call PRINTS,CC $(<F))$(CC) $(CFLAGS) -I$(OBJDIR) -c $< -o $@
|
||||
|
||||
build-bitmaps:
|
||||
$(SILENT)$(MAKE) -C bitmaps OBJDIR=$(OBJDIR)/bitmaps
|
||||
build-bitmapsmono:
|
||||
$(call PRINTS,MAKE in plugins/bitmaps/mono)$(MAKE) -C bitmaps/mono OBJDIR=$(OBJDIR)/bitmaps/mono
|
||||
|
||||
$(BITMAPLIBS): build-bitmaps
|
||||
build-bitmapsnative:
|
||||
$(call PRINTS,MAKE in plugins/bitmaps/native)$(MAKE) -C bitmaps/native OBJDIR=$(OBJDIR)/bitmaps/native
|
||||
|
||||
build-bitmapsremotemono:
|
||||
$(call PRINTS,MAKE in plugins/bitmaps/remote_mono)$(MAKE) -C bitmaps/remote_mono OBJDIR=$(OBJDIR)/bitmaps/remote_mono
|
||||
|
||||
build-bitmapsremotenative:
|
||||
$(call PRINTS,MAKE in plugins/bitmaps/remote_native)$(MAKE) -C bitmaps/remote_native OBJDIR=$(OBJDIR)/bitmaps/remote_native
|
||||
|
||||
$(BITMAPLIBS): $(BUILDDIR)/libplugin%.a: build-%
|
||||
|
||||
ifndef SIMVER
|
||||
$(OBJDIR)/%.elf: $(OBJDIR)/%.o $(LINKFILE) $(BUILDDIR)/libplugin.a $(BITMAPLIBS)
|
||||
@echo "LD $(notdir $@)"
|
||||
$(SILENT)$(CC) $(GCCOPTS) -O -nostdlib -o $@ $< -L$(BUILDDIR) $(CODECLIBS) -lplugin $(LINKBITMAPS) -lgcc -T$(LINKFILE) -Wl,--gc-sections -Wl,-Map,$(OBJDIR)/$*.map
|
||||
$(call PRINTS,LD $(@F))$(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 $(notdir $@)"
|
||||
$(SILENT)$(OC) -O binary $< $@
|
||||
$(call PRINTS,OBJCOPY $(@F))$(OC) -O binary $< $@
|
||||
else
|
||||
|
||||
ifeq ($(SIMVER), x11)
|
||||
|
@ -95,8 +100,7 @@ ifeq ($(SIMVER), x11)
|
|||
# This is the X11 simulator version
|
||||
|
||||
$(OBJDIR)/%.rock : $(OBJDIR)/%.o $(BUILDDIR)/libplugin.a $(BITMAPLIBS)
|
||||
@echo "LD $(notdir $@)"
|
||||
$(SILENT)$(CC) $(CFLAGS) $(SHARED_FLAG) $< -L$(BUILDDIR) $(CODECLIBS) -lplugin $(LINKBITMAPS) -o $@
|
||||
$(call PRINTS,LD $(@F))$(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"
|
||||
# $ fgrep 5 /usr/include/w32api/winerror.h | head -1
|
||||
|
@ -111,8 +115,7 @@ ifeq ($(SIMVER), sdl)
|
|||
# This is the SDL simulator version
|
||||
|
||||
$(OBJDIR)/%.rock : $(OBJDIR)/%.o $(BUILDDIR)/libplugin.a $(BITMAPLIBS)
|
||||
@echo "LD $(notdir $@)"
|
||||
$(SILENT)$(CC) $(CFLAGS) $(SHARED_FLAG) $< -L$(BUILDDIR) $(CODECLIBS) -lplugin $(LINKBITMAPS) -o $@
|
||||
$(call PRINTS,LD $(@F))$(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"
|
||||
# $ fgrep 5 /usr/include/w32api/winerror.h | head -1
|
||||
|
@ -128,8 +131,7 @@ DLLTOOLFLAGS = --export-all
|
|||
DLLWRAPFLAGS = -s --entry _DllMain@12 --target=i386-mingw32 -mno-cygwin
|
||||
|
||||
$(OBJDIR)/%.rock : $(OBJDIR)/%.o $(BUILDDIR)/libplugin.a $(BITMAPLIBS)
|
||||
@echo "DLL $(notdir $@)"
|
||||
$(SILENT)$(DLLTOOL) $(DLLTOOLFLAGS) -z $(OBJDIR)/$*.def $<
|
||||
$(call PRINTS,DLL $(@F))$(DLLTOOL) $(DLLTOOLFLAGS) -z $(OBJDIR)/$*.def $<
|
||||
$(SILENT)$(DLLWRAP) $(DLLWRAPFLAGS) --def $(OBJDIR)/$*.def $< $(BUILDDIR)/libplugin.a $(BITMAPLIBS) \
|
||||
$(patsubst -l%,$(BUILDDIR)/lib%.a,$(CODECLIBS)) -o $@
|
||||
ifeq ($(findstring CYGWIN,$(UNAME)),CYGWIN)
|
||||
|
@ -147,23 +149,19 @@ endif # end of simulator section
|
|||
include $(TOOLSDIR)/make.inc
|
||||
|
||||
$(BUILDDIR)/libplugin.a:
|
||||
@echo "MAKE in plugin/lib"
|
||||
$(SILENT)mkdir -p $(OBJDIR)/lib
|
||||
$(SILENT)$(MAKE) -C lib OBJDIR=$(OBJDIR)/lib
|
||||
$(call PRINTS,MAKE in plugin/lib)$(MAKE) -C lib OBJDIR=$(OBJDIR)/lib
|
||||
|
||||
$(LINKFILE): $(LDS)
|
||||
@echo "build $(notdir $@)"
|
||||
$(SILENT)cat $< | $(CC) -DMEMORYSIZE=$(MEMORYSIZE) $(INCLUDES) $(TARGET) $(DEFINES) -E -P - >$@
|
||||
$(call PRINTS,build $(@F))cat $< | $(CC) -DMEMORYSIZE=$(MEMORYSIZE) $(INCLUDES) $(TARGET) $(DEFINES) -E -P - >$@
|
||||
|
||||
$(SUBDIRS): $(BITMAPLIBS)
|
||||
@echo "MAKE in $@"
|
||||
$(SILENT)mkdir -p $(OBJDIR)/$@
|
||||
$(SILENT)$(MAKE) -C $@ OUTDIR=$(OBJDIR) OBJDIR=$(OBJDIR)/$@ \
|
||||
$(call PRINTS,MAKE in $@)$(MAKE) -C $@ OUTDIR=$(OBJDIR) OBJDIR=$(OBJDIR)/$@ \
|
||||
LINKBITMAPS="$(LINKBITMAPS)" BITMAPLIBS="$(BITMAPLIBS)"
|
||||
|
||||
clean:
|
||||
@echo "cleaning plugins"
|
||||
$(SILENT)rm -f $(ROCKS) $(LINKFILE) $(OBJDIR)/*.rock $(DEPFILE) $(ELFS) \
|
||||
$(call PRINTS,cleaning plugins)rm -f $(ROCKS) $(LINKFILE) $(OBJDIR)/*.rock $(DEPFILE) $(ELFS) \
|
||||
$(BUILDDIR)/credits.raw $(OBJS) $(DEFS)
|
||||
$(SILENT)$(MAKE) -C lib clean OBJDIR=$(OBJDIR)/lib
|
||||
$(SILENT)$(MAKE) -C bitmaps/mono clean OBJDIR=$(OBJDIR)/bitmaps/mono
|
||||
|
|
|
@ -1,34 +0,0 @@
|
|||
# __________ __ ___.
|
||||
# Open \______ \ ____ ____ | | _\_ |__ _______ ___
|
||||
# Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
|
||||
# Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
|
||||
# Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
|
||||
# \/ \/ \/ \/ \/
|
||||
# $Id$
|
||||
#
|
||||
|
||||
ifndef V
|
||||
SILENT=@
|
||||
endif
|
||||
|
||||
all:
|
||||
ifneq ($(strip $(BMP2RB_NATIVE)),)
|
||||
@echo "MAKE in plugins/bitmaps/native"
|
||||
$(SILENT)mkdir -p $(OBJDIR)/native
|
||||
@$(MAKE) -C native OBJDIR=$(OBJDIR)/native
|
||||
endif
|
||||
ifneq ($(strip $(BMP2RB_MONO)),)
|
||||
@echo "MAKE in plugins/bitmaps/mono"
|
||||
$(SILENT)mkdir -p $(OBJDIR)/mono
|
||||
@$(MAKE) -C mono OBJDIR=$(OBJDIR)/mono
|
||||
endif
|
||||
ifneq ($(strip $(BMP2RB_REMOTENATIVE)),)
|
||||
@echo "MAKE in plugins/bitmaps/remote_native"
|
||||
$(SILENT)mkdir -p $(OBJDIR)/remote_native
|
||||
@$(MAKE) -C remote_native OBJDIR=$(OBJDIR)/remote_native
|
||||
endif
|
||||
ifneq ($(strip $(BMP2RB_REMOTEMONO)),)
|
||||
@echo "MAKE in plugins/bitmaps/remote_mono"
|
||||
$(SILENT)mkdir -p $(OBJDIR)/remote_mono
|
||||
@$(MAKE) -C remote_mono OBJDIR=$(OBJDIR)/remote_mono
|
||||
endif
|
|
@ -26,8 +26,7 @@ BMPINCDIR = $(BUILDDIR)/pluginbitmaps
|
|||
include $(TOOLSDIR)/makebmp.inc
|
||||
|
||||
clean:
|
||||
@echo "cleaning plugins/bitmaps/mono"
|
||||
@rm -f $(CSRC) $(OBJS) $(OUTPUT) $(DEPFILE)
|
||||
$(call PRINTS,cleaning plugins/bitmaps/mono)rm -f $(CSRC) $(OBJS) $(OUTPUT) $(DEPFILE)
|
||||
@rmdir $(OBJDIR)
|
||||
|
||||
-include $(DEPFILE)
|
||||
|
|
|
@ -26,8 +26,7 @@ BMPINCDIR = $(BUILDDIR)/pluginbitmaps
|
|||
include $(TOOLSDIR)/makebmp.inc
|
||||
|
||||
clean:
|
||||
@echo "cleaning plugins/bitmaps/native"
|
||||
@rm -f $(CSRC) $(OBJS) $(OUTPUT) $(DEPFILE)
|
||||
$(call PRINTS,cleaning plugins/bitmaps/native)rm -f $(CSRC) $(OBJS) $(OUTPUT) $(DEPFILE)
|
||||
@rmdir $(OBJDIR)
|
||||
|
||||
-include $(DEPFILE)
|
||||
|
|
|
@ -26,8 +26,7 @@ BMPINCDIR = $(BUILDDIR)/pluginbitmaps
|
|||
include $(TOOLSDIR)/makebmp.inc
|
||||
|
||||
clean:
|
||||
@echo "cleaning plugins/bitmaps/remotemono"
|
||||
@rm -f $(CSRC) $(OBJS) $(OUTPUT) $(DEPFILE)
|
||||
$(call PRINTS,cleaning plugins/bitmaps/remotemono)rm -f $(CSRC) $(OBJS) $(OUTPUT) $(DEPFILE)
|
||||
@rmdir $(OBJDIR)
|
||||
|
||||
-include $(DEPFILE)
|
||||
|
|
|
@ -26,8 +26,7 @@ BMPINCDIR = $(BUILDDIR)/pluginbitmaps
|
|||
include $(TOOLSDIR)/makebmp.inc
|
||||
|
||||
clean:
|
||||
@echo "cleaning plugins/bitmaps/remote_native"
|
||||
@rm -f $(CSRC) $(OBJS) $(OUTPUT) $(DEPFILE)
|
||||
$(call PRINTS,cleaning plugins/bitmaps/remote_native)rm -f $(CSRC) $(OBJS) $(OUTPUT) $(DEPFILE)
|
||||
@rmdir $(OBJDIR)
|
||||
|
||||
-include $(DEPFILE)
|
||||
|
|
|
@ -40,13 +40,11 @@ all: $(OUTPUT)
|
|||
|
||||
ifndef SIMVER
|
||||
$(OBJDIR)/chessbox.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)/chessbox.map
|
||||
|
||||
$(OUTPUT): $(OBJDIR)/chessbox.elf
|
||||
@echo "OBJCOPY $(notdir $@)"
|
||||
@$(OC) -O binary $< $@
|
||||
$(call PRINTS,OBJCOPY $(@F))$(OC) -O binary $< $@
|
||||
else
|
||||
|
||||
ifeq ($(SIMVER), x11)
|
||||
|
@ -54,8 +52,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
|
||||
|
@ -70,8 +67,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
|
||||
|
@ -87,9 +83,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"
|
||||
|
@ -108,13 +103,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 chessbox"
|
||||
@rm -rf $(OBJDIR)/chessbox
|
||||
@rm -f $(OBJDIR)/chessbox.* $(DEPFILE)
|
||||
$(call PRINTS,cleaning chessbox)rm -rf $(OBJDIR)/chessbox
|
||||
$(SILENT)rm -f $(OBJDIR)/chessbox.* $(DEPFILE)
|
||||
|
||||
-include $(DEPFILE)
|
||||
|
|
|
@ -31,13 +31,11 @@ all: $(OUTPUT)
|
|||
|
||||
ifndef SIMVER
|
||||
$(OBJDIR)/databox.elf: $(OBJS) $(LINKFILE)
|
||||
@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 \
|
||||
-T$(LINKFILE) -Wl,-Map,$(OBJDIR)/databox.map
|
||||
|
||||
$(OUTPUT): $(OBJDIR)/databox.elf
|
||||
@echo "OBJCOPY $(notdir $@)"
|
||||
@$(OC) -O binary $< $@
|
||||
$(call PRINTS,OBJCOPY $(@F))$(OC) -O binary $< $@
|
||||
else
|
||||
|
||||
ifeq ($(SIMVER), x11)
|
||||
|
@ -45,8 +43,7 @@ ifeq ($(SIMVER), x11)
|
|||
# This is the X11 simulator version
|
||||
|
||||
$(OUTPUT): $(OBJS)
|
||||
@echo "LD $(notdir $@)"
|
||||
@$(CC) $(CFLAGS) $(SHARED_FLAG) $(OBJS) -L$(BUILDDIR) -lplugin -o $@
|
||||
$(call PRINTS,LD $(@F))$(CC) $(CFLAGS) $(SHARED_FLAG) $(OBJS) -L$(BUILDDIR) -lplugin -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
|
||||
|
@ -61,8 +58,7 @@ ifeq ($(SIMVER), sdl)
|
|||
# This is the SDL simulator version
|
||||
|
||||
$(OUTPUT): $(OBJS)
|
||||
@echo "LD $(notdir $@)"
|
||||
@$(CC) $(CFLAGS) $(SHARED_FLAG) $(OBJS) -L$(BUILDDIR) -lplugin -o $@
|
||||
$(call PRINTS,LD $(@F))$(CC) $(CFLAGS) $(SHARED_FLAG) $(OBJS) -L$(BUILDDIR) -lplugin -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
|
||||
|
@ -78,9 +74,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 -o $@
|
||||
ifeq ($(findstring CYGWIN,$(UNAME)),CYGWIN)
|
||||
# 'x' must be kept or you'll have "Win32 error 5"
|
||||
|
@ -99,14 +94,12 @@ 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 databox"
|
||||
@rm -rf $(OBJDIR)/databox
|
||||
@rm -f $(OBJDIR)/databox.* $(DEPFILE)
|
||||
$(call PRINTS,cleaning databox)rm -rf $(OBJDIR)/databox
|
||||
$(SILENT)rm -f $(OBJDIR)/databox.* $(DEPFILE)
|
||||
|
||||
-include $(DEPFILE)
|
||||
|
||||
|
|
|
@ -3,7 +3,10 @@
|
|||
# $Id$
|
||||
#
|
||||
# $Log$
|
||||
# Revision 1.9 2006/10/23 22:33:36 amiconn
|
||||
# Revision 1.10 2006/10/27 21:47:55 amiconn
|
||||
# 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.
|
||||
#
|
||||
# Revision 1.9 2006-10-23 22:33:36 amiconn
|
||||
# Consistent style of 'make' messages. Always use ranlib after ar.
|
||||
#
|
||||
# Revision 1.8 2006-10-23 14:09:28 markun
|
||||
|
@ -85,13 +88,11 @@ all: $(OUTPUT)
|
|||
|
||||
ifndef SIMVER
|
||||
$(OBJDIR)/doom.elf: $(OBJS) $(LINKFILE)
|
||||
@echo "LD $(notdir $@)"
|
||||
@$(CC) $(GCCOPTS) $(LDFLAGS) -nostdlib -o $@ $(OBJS) -L$(BUILDDIR) -lplugin -lgcc\
|
||||
$(call PRINTS,LD $(@F))$(CC) $(GCCOPTS) $(LDFLAGS) -nostdlib -o $@ $(OBJS) -L$(BUILDDIR) -lplugin -lgcc\
|
||||
-T$(LINKFILE) -Wl,-Map,$(OBJDIR)/doom.map
|
||||
|
||||
$(OUTPUT): $(OBJDIR)/doom.elf
|
||||
@echo "OBJCOPY $(notdir $@)"
|
||||
@$(OC) -O binary $< $@
|
||||
$(call PRINTS,OBJCOPY $(@F))$(OC) -O binary $< $@
|
||||
else
|
||||
|
||||
ifeq ($(SIMVER), x11)
|
||||
|
@ -99,8 +100,7 @@ ifeq ($(SIMVER), x11)
|
|||
# This is the X11 simulator version
|
||||
|
||||
$(OUTPUT): $(OBJS)
|
||||
@echo "LD $(notdir $@)"
|
||||
@$(CC) $(CFLAGS) $(SHARED_FLAG) $(OBJS) -L$(BUILDDIR) -lplugin -o $@
|
||||
$(call PRINTS,LD $(@F))$(CC) $(CFLAGS) $(SHARED_FLAG) $(OBJS) -L$(BUILDDIR) -lplugin -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
|
||||
|
@ -115,8 +115,7 @@ ifeq ($(SIMVER), sdl)
|
|||
# This is the sdl simulator version
|
||||
|
||||
$(OUTPUT): $(OBJS)
|
||||
@echo "LD $(notdir $@)"
|
||||
@$(CC) $(CFLAGS) $(SHARED_FLAG) $(OBJS) -L$(BUILDDIR) -lplugin -o $@
|
||||
$(call PRINTS,LD $(@F))$(CC) $(CFLAGS) $(SHARED_FLAG) $(OBJS) -L$(BUILDDIR) -lplugin -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
|
||||
|
@ -132,9 +131,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 -o $@
|
||||
ifeq ($(findstring CYGWIN,$(UNAME)),CYGWIN)
|
||||
# 'x' must be kept or you'll have "Win32 error 5"
|
||||
|
@ -153,13 +151,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) $(DEFINES) \
|
||||
$(call PRINTS,build $(@F))cat $< | $(CC) -DMEMORYSIZE=$(MEMORYSIZE) $(INCLUDES) $(TARGET) $(DEFINES) \
|
||||
-E -P - >$@
|
||||
|
||||
clean:
|
||||
@echo "cleaning doom"
|
||||
@rm -rf $(OBJDIR)/doom
|
||||
@rm -f $(OBJDIR)/doom.* $(DEPFILE)
|
||||
$(call PRINTS,cleaning doom)rm -rf $(OBJDIR)/doom
|
||||
$(SILENT)rm -f $(OBJDIR)/doom.* $(DEPFILE)
|
||||
|
||||
-include $(DEPFILE)
|
||||
|
|
|
@ -38,14 +38,12 @@ OUTPUT = $(BUILDDIR)/libplugin.a
|
|||
all: $(OUTPUT)
|
||||
|
||||
$(OUTPUT): $(OBJS)
|
||||
@echo "AR+RANLIB $(notdir $@)"
|
||||
@$(AR) ruv $@ $+ >/dev/null 2>&1
|
||||
@$(RANLIB) $@
|
||||
$(call PRINTS,AR+RANLIB $(@F))$(AR) ruv $@ $+ >/dev/null 2>&1
|
||||
$(SILENT)$(RANLIB) $@
|
||||
|
||||
include $(TOOLSDIR)/make.inc
|
||||
|
||||
clean:
|
||||
@echo "cleaning lib"
|
||||
@rm -f $(OBJS) $(OUTPUT) $(DEPFILE)
|
||||
$(call PRINTS,cleaning lib)rm -f $(OBJS) $(OUTPUT) $(DEPFILE)
|
||||
|
||||
-include $(DEPFILE)
|
||||
|
|
|
@ -34,13 +34,11 @@ all: $(OUTPUT)
|
|||
|
||||
ifndef SIMVER
|
||||
$(OBJDIR)/mpegplayer.elf: $(OBJS) $(LINKFILE)
|
||||
@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 \
|
||||
-T$(LINKFILE) -Wl,-Map,$(OBJDIR)/mpegplayer.map
|
||||
|
||||
$(OUTPUT): $(OBJDIR)/mpegplayer.elf
|
||||
@echo "OBJCOPY $(notdir $@)"
|
||||
@$(OC) -O binary $< $@
|
||||
$(call PRINTS,OBJCOPY $(@F))$(OC) -O binary $< $@
|
||||
else
|
||||
|
||||
ifeq ($(SIMVER), x11)
|
||||
|
@ -48,8 +46,7 @@ ifeq ($(SIMVER), x11)
|
|||
# This is the X11 simulator version
|
||||
|
||||
$(OUTPUT): $(OBJS)
|
||||
@echo "LD $(notdir $@)"
|
||||
@$(CC) $(CFLAGS) $(SHARED_FLAG) $(OBJS) -L$(BUILDDIR) -lplugin -o $@
|
||||
$(call PRINTS,LD $(@F))$(CC) $(CFLAGS) $(SHARED_FLAG) $(OBJS) -L$(BUILDDIR) -lplugin -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
|
||||
|
@ -64,8 +61,7 @@ ifeq ($(SIMVER), sdl)
|
|||
# This is the SDL simulator version
|
||||
|
||||
$(OUTPUT): $(OBJS)
|
||||
@echo "LD $(notdir $@)"
|
||||
@$(CC) $(CFLAGS) $(SHARED_FLAG) $(OBJS) -L$(BUILDDIR) -lplugin -o $@
|
||||
$(call PRINTS,LD $(@F))$(CC) $(CFLAGS) $(SHARED_FLAG) $(OBJS) -L$(BUILDDIR) -lplugin -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
|
||||
|
@ -81,9 +77,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 -o $@
|
||||
ifeq ($(findstring CYGWIN,$(UNAME)),CYGWIN)
|
||||
# 'x' must be kept or you'll have "Win32 error 5"
|
||||
|
@ -102,14 +97,12 @@ 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 mpegplayer"
|
||||
@rm -rf $(OBJDIR)/mpegplayer
|
||||
@rm -f $(OBJDIR)/mpegplayer.* $(DEPFILE)
|
||||
$(call PRINTS,cleaning mpegplayer)rm -rf $(OBJDIR)/mpegplayer
|
||||
$(SILENT)rm -f $(OBJDIR)/mpegplayer.* $(DEPFILE)
|
||||
|
||||
-include $(DEPFILE)
|
||||
|
||||
|
|
|
@ -34,13 +34,11 @@ all: $(OUTPUT)
|
|||
|
||||
ifndef SIMVER
|
||||
$(OBJDIR)/pacbox.elf: $(OBJS) $(LINKFILE)
|
||||
@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 \
|
||||
-T$(LINKFILE) -Wl,-Map,$(OBJDIR)/pacbox.map
|
||||
|
||||
$(OUTPUT): $(OBJDIR)/pacbox.elf
|
||||
@echo "OBJCOPY $(notdir $@)"
|
||||
@$(OC) -O binary $< $@
|
||||
$(call PRINTS,OBJCOPY $(@F))$(OC) -O binary $< $@
|
||||
else
|
||||
|
||||
ifeq ($(SIMVER), x11)
|
||||
|
@ -48,8 +46,7 @@ ifeq ($(SIMVER), x11)
|
|||
# This is the X11 simulator version
|
||||
|
||||
$(OUTPUT): $(OBJS)
|
||||
@echo "LD $(notdir $@)"
|
||||
@$(CC) $(CFLAGS) $(SHARED_FLAG) $(OBJS) -L$(BUILDDIR) -lplugin -o $@
|
||||
$(call PRINTS,LD $(@F))$(CC) $(CFLAGS) $(SHARED_FLAG) $(OBJS) -L$(BUILDDIR) -lplugin -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
|
||||
|
@ -64,8 +61,7 @@ ifeq ($(SIMVER), sdl)
|
|||
# This is the SDL simulator version
|
||||
|
||||
$(OUTPUT): $(OBJS)
|
||||
@echo "LD $(notdir $@)"
|
||||
@$(CC) $(CFLAGS) $(SHARED_FLAG) $(OBJS) -L$(BUILDDIR) -lplugin -o $@
|
||||
$(call PRINTS,LD $(@F))$(CC) $(CFLAGS) $(SHARED_FLAG) $(OBJS) -L$(BUILDDIR) -lplugin -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
|
||||
|
@ -81,9 +77,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 -o $@
|
||||
ifeq ($(findstring CYGWIN,$(UNAME)),CYGWIN)
|
||||
# 'x' must be kept or you'll have "Win32 error 5"
|
||||
|
@ -102,14 +97,12 @@ 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 pacbox"
|
||||
@rm -rf $(OBJDIR)/pacbox
|
||||
@rm -f $(OBJDIR)/pacbox.* $(DEPFILE)
|
||||
$(call PRINTS,cleaning pacbox)rm -rf $(OBJDIR)/pacbox
|
||||
$(SILENT)rm -f $(OBJDIR)/pacbox.* $(DEPFILE)
|
||||
|
||||
-include $(DEPFILE)
|
||||
|
||||
|
|
|
@ -47,13 +47,11 @@ all: $(OUTPUT)
|
|||
|
||||
ifndef SIMVER
|
||||
$(OBJDIR)/rockboy.elf: $(OBJS) $(LINKFILE)
|
||||
@echo "LD $(notdir $@)"
|
||||
@$(CC) $(GCCOPTS) -O2 -nostdlib -o $@ $(OBJS) -L$(BUILDDIR) -lplugin -fast -lgcc \
|
||||
$(call PRINTS,LD $(@F))$(CC) $(GCCOPTS) -O2 -nostdlib -o $@ $(OBJS) -L$(BUILDDIR) -lplugin -fast -lgcc \
|
||||
-T$(LINKFILE) -Wl,-Map,$(OBJDIR)/rockboy.map
|
||||
|
||||
$(OUTPUT): $(OBJDIR)/rockboy.elf
|
||||
@echo "OBJCOPY $(notdir $@)"
|
||||
@$(OC) -O binary $< $@
|
||||
$(call PRINTS,OBJCOPY $(@F))$(OC) -O binary $< $@
|
||||
else
|
||||
|
||||
ifeq ($(SIMVER), x11)
|
||||
|
@ -61,8 +59,7 @@ ifeq ($(SIMVER), x11)
|
|||
# This is the X11 simulator version
|
||||
|
||||
$(OUTPUT): $(OBJS)
|
||||
@echo "LD $(notdir $@)"
|
||||
@$(CC) $(CFLAGS) $(SHARED_FLAG) $(OBJS) -L$(BUILDDIR) -lplugin -o $@
|
||||
$(call PRINTS,LD $(@F))$(CC) $(CFLAGS) $(SHARED_FLAG) $(OBJS) -L$(BUILDDIR) -lplugin -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
|
||||
|
@ -77,8 +74,7 @@ ifeq ($(SIMVER), sdl)
|
|||
# This is the sdl simulator version
|
||||
|
||||
$(OUTPUT): $(OBJS)
|
||||
@echo "LD $(notdir $@)"
|
||||
@$(CC) $(CFLAGS) $(SHARED_FLAG) $(OBJS) -L$(BUILDDIR) -lplugin -o $@
|
||||
$(call PRINTS,LD $(@F))$(CC) $(CFLAGS) $(SHARED_FLAG) $(OBJS) -L$(BUILDDIR) -lplugin -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
|
||||
|
@ -94,9 +90,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 -o $@
|
||||
ifeq ($(findstring CYGWIN,$(UNAME)),CYGWIN)
|
||||
# 'x' must be kept or you'll have "Win32 error 5"
|
||||
|
@ -115,14 +110,12 @@ 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) $(DEFINES) \
|
||||
$(call PRINTS,build $(@F))cat $< | $(CC) -DMEMORYSIZE=$(MEMORYSIZE) $(INCLUDES) $(TARGET) $(DEFINES) \
|
||||
-E -P - >$@
|
||||
|
||||
clean:
|
||||
@echo "cleaning rockboy"
|
||||
@rm -rf $(OBJDIR)/rockboy
|
||||
@rm -f $(OBJDIR)/rockboy.* $(DEPFILE)
|
||||
$(call PRINTS,cleaning rockboy)rm -rf $(OBJDIR)/rockboy
|
||||
$(SILENT)rm -f $(OBJDIR)/rockboy.* $(DEPFILE)
|
||||
|
||||
-include $(DEPFILE)
|
||||
|
||||
|
|
|
@ -31,13 +31,11 @@ all: $(OUTPUT)
|
|||
|
||||
ifndef SIMVER
|
||||
$(OBJDIR)/searchengine.elf: $(OBJS) $(LINKFILE)
|
||||
@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 \
|
||||
-T$(LINKFILE) -Wl,-Map,$(OBJDIR)/searchengine.map
|
||||
|
||||
$(OUTPUT): $(OBJDIR)/searchengine.elf
|
||||
@echo "OBJCOPY $(notdir $@)"
|
||||
@$(OC) -O binary $< $@
|
||||
$(call PRINTS,OBJCOPY $(@F))$(OC) -O binary $< $@
|
||||
else
|
||||
|
||||
ifeq ($(SIMVER), x11)
|
||||
|
@ -45,8 +43,7 @@ ifeq ($(SIMVER), x11)
|
|||
# This is the X11 simulator version
|
||||
|
||||
$(OUTPUT): $(OBJS)
|
||||
@echo "LD $(notdir $@)"
|
||||
@$(CC) $(CFLAGS) $(SHARED_FLAG) $(OBJS) -L$(BUILDDIR) -lplugin -o $@
|
||||
$(call PRINTS,LD $(@F))$(CC) $(CFLAGS) $(SHARED_FLAG) $(OBJS) -L$(BUILDDIR) -lplugin -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
|
||||
|
@ -61,8 +58,7 @@ ifeq ($(SIMVER), sdl)
|
|||
# This is the SDL simulator version
|
||||
|
||||
$(OUTPUT): $(OBJS)
|
||||
@echo "LD $(notdir $@)"
|
||||
@$(CC) $(CFLAGS) $(SHARED_FLAG) $(OBJS) -L$(BUILDDIR) -lplugin -o $@
|
||||
$(call PRINTS,LD $(@F))$(CC) $(CFLAGS) $(SHARED_FLAG) $(OBJS) -L$(BUILDDIR) -lplugin -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
|
||||
|
@ -78,9 +74,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 -o $@
|
||||
ifeq ($(findstring CYGWIN,$(UNAME)),CYGWIN)
|
||||
# 'x' must be kept or you'll have "Win32 error 5"
|
||||
|
@ -99,14 +94,12 @@ 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 searchengine"
|
||||
@rm -rf $(OBJDIR)/searchengine
|
||||
@rm -f $(OBJDIR)/searchengine.* $(DEPFILE)
|
||||
$(call PRINTS,cleaning searchengine)rm -rf $(OBJDIR)/searchengine
|
||||
$(SILENT)rm -f $(OBJDIR)/searchengine.* $(DEPFILE)
|
||||
|
||||
-include $(DEPFILE)
|
||||
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -43,13 +43,11 @@ all: $(OUTPUT)
|
|||
|
||||
ifndef SIMVER
|
||||
$(OBJDIR)/zxbox.elf: $(OBJS) $(LINKFILE)
|
||||
@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 \
|
||||
-T$(LINKFILE) -Wl,-Map,$(OBJDIR)/zxbox.map
|
||||
|
||||
$(OUTPUT): $(OBJDIR)/zxbox.elf
|
||||
@echo "OBJCOPY $(notdir $@)"
|
||||
@$(OC) -O binary $< $@
|
||||
$(call PRINTS,OBJCOPY $(@F))$(OC) -O binary $< $@
|
||||
else
|
||||
|
||||
ifeq ($(SIMVER), sdl)
|
||||
|
@ -57,8 +55,7 @@ ifeq ($(SIMVER), sdl)
|
|||
# This is the SDL simulator version
|
||||
|
||||
$(OUTPUT): $(OBJS)
|
||||
@echo "LD $(notdir $@)"
|
||||
@$(CC) $(CFLAGS) $(SHARED_FLAG) $(OBJS) -L$(BUILDDIR) -lplugin -o $@
|
||||
$(call PRINTS,LD $(@F))$(CC) $(CFLAGS) $(SHARED_FLAG) $(OBJS) -L$(BUILDDIR) -lplugin -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
|
||||
|
@ -76,14 +73,12 @@ 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 zxbox"
|
||||
@rm -rf $(OBJDIR)/zxbox
|
||||
@rm -f $(OBJDIR)/zxbox.* $(DEPFILE)
|
||||
$(call PRINTS,cleaning zxbox)rm -rf $(OBJDIR)/zxbox
|
||||
$(SILENT)rm -f $(OBJDIR)/zxbox.* $(DEPFILE)
|
||||
|
||||
-include $(DEPFILE)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue