summaryrefslogtreecommitdiff
path: root/apps/plugins/chessbox/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'apps/plugins/chessbox/Makefile')
-rw-r--r--apps/plugins/chessbox/Makefile25
1 files changed, 9 insertions, 16 deletions
diff --git a/apps/plugins/chessbox/Makefile b/apps/plugins/chessbox/Makefile
index 7b3ade24e4..5f1a855082 100644
--- a/apps/plugins/chessbox/Makefile
+++ b/apps/plugins/chessbox/Makefile
@@ -40,13 +40,11 @@ all: $(OUTPUT)
40 40
41ifndef SIMVER 41ifndef SIMVER
42$(OBJDIR)/chessbox.elf: $(OBJS) $(LINKFILE) $(BITMAPLIBS) 42$(OBJDIR)/chessbox.elf: $(OBJS) $(LINKFILE) $(BITMAPLIBS)
43 @echo "LD $(notdir $@)" 43 $(call PRINTS,LD $(@F))$(CC) $(GCCOPTS) -O -nostdlib -o $@ $(OBJS) -L$(BUILDDIR) -lplugin -lgcc \
44 @$(CC) $(GCCOPTS) -O -nostdlib -o $@ $(OBJS) -L$(BUILDDIR) -lplugin -lgcc \
45 $(LINKBITMAPS) -T$(LINKFILE) -Wl,-Map,$(OBJDIR)/chessbox.map 44 $(LINKBITMAPS) -T$(LINKFILE) -Wl,-Map,$(OBJDIR)/chessbox.map
46 45
47$(OUTPUT): $(OBJDIR)/chessbox.elf 46$(OUTPUT): $(OBJDIR)/chessbox.elf
48 @echo "OBJCOPY $(notdir $@)" 47 $(call PRINTS,OBJCOPY $(@F))$(OC) -O binary $< $@
49 @$(OC) -O binary $< $@
50else 48else
51 49
52ifeq ($(SIMVER), x11) 50ifeq ($(SIMVER), x11)
@@ -54,8 +52,7 @@ ifeq ($(SIMVER), x11)
54# This is the X11 simulator version 52# This is the X11 simulator version
55 53
56$(OUTPUT): $(OBJS) 54$(OUTPUT): $(OBJS)
57 @echo "LD $(notdir $@)" 55 $(call PRINTS,LD $(@F))$(CC) $(CFLAGS) $(SHARED_FLAG) $(OBJS) -L$(BUILDDIR) -lplugin $(LINKBITMAPS) -o $@
58 @$(CC) $(CFLAGS) $(SHARED_FLAG) $(OBJS) -L$(BUILDDIR) -lplugin $(LINKBITMAPS) -o $@
59ifeq ($(findstring CYGWIN,$(UNAME)),CYGWIN) 56ifeq ($(findstring CYGWIN,$(UNAME)),CYGWIN)
60# 'x' must be kept or you'll have "Win32 error 5" 57# 'x' must be kept or you'll have "Win32 error 5"
61# $ fgrep 5 /usr/include/w32api/winerror.h | head -1 58# $ fgrep 5 /usr/include/w32api/winerror.h | head -1
@@ -70,8 +67,7 @@ ifeq ($(SIMVER), sdl)
70# This is the SDL simulator version 67# This is the SDL simulator version
71 68
72$(OUTPUT): $(OBJS) 69$(OUTPUT): $(OBJS)
73 @echo "LD $(notdir $@)" 70 $(call PRINTS,LD $(@F))$(CC) $(CFLAGS) $(SHARED_FLAG) $(OBJS) -L$(BUILDDIR) -lplugin $(LINKBITMAPS) -o $@
74 @$(CC) $(CFLAGS) $(SHARED_FLAG) $(OBJS) -L$(BUILDDIR) -lplugin $(LINKBITMAPS) -o $@
75ifeq ($(findstring CYGWIN,$(UNAME)),CYGWIN) 71ifeq ($(findstring CYGWIN,$(UNAME)),CYGWIN)
76# 'x' must be kept or you'll have "Win32 error 5" 72# 'x' must be kept or you'll have "Win32 error 5"
77# $ fgrep 5 /usr/include/w32api/winerror.h | head -1 73# $ fgrep 5 /usr/include/w32api/winerror.h | head -1
@@ -87,9 +83,8 @@ DLLTOOLFLAGS = --export-all
87DLLWRAPFLAGS = -s --entry _DllMain@12 --target=i386-mingw32 -mno-cygwin 83DLLWRAPFLAGS = -s --entry _DllMain@12 --target=i386-mingw32 -mno-cygwin
88 84
89$(OUTPUT): $(OBJS) 85$(OUTPUT): $(OBJS)
90 @echo "DLL $(notdir $@)" 86 $(call PRINTS,DLL $(@F))$(DLLTOOL) $(DLLTOOLFLAGS) -z $(OBJDIR)/$*.def $(OBJS)
91 @$(DLLTOOL) $(DLLTOOLFLAGS) -z $(OBJDIR)/$*.def $(OBJS) 87 $(SILENT)$(DLLWRAP) $(DLLWRAPFLAGS) --def $(OBJDIR)/$*.def $(OBJS) \
92 @$(DLLWRAP) $(DLLWRAPFLAGS) --def $(OBJDIR)/$*.def $(OBJS) \
93 $(BUILDDIR)/libplugin.a $(BITMAPLIBS) -o $@ 88 $(BUILDDIR)/libplugin.a $(BITMAPLIBS) -o $@
94ifeq ($(findstring CYGWIN,$(UNAME)),CYGWIN) 89ifeq ($(findstring CYGWIN,$(UNAME)),CYGWIN)
95# 'x' must be kept or you'll have "Win32 error 5" 90# 'x' must be kept or you'll have "Win32 error 5"
@@ -108,13 +103,11 @@ include $(TOOLSDIR)/make.inc
108# MEMORYSIZE should be passed on to this makefile with the chosen memory size 103# MEMORYSIZE should be passed on to this makefile with the chosen memory size
109# given in number of MB 104# given in number of MB
110$(LINKFILE): $(LDS) 105$(LINKFILE): $(LDS)
111 @echo "build $(notdir $@)" 106 $(call PRINTS,build $(@F))cat $< | $(CC) -DMEMORYSIZE=$(MEMORYSIZE) $(INCLUDES) $(TARGET) \
112 @cat $< | $(CC) -DMEMORYSIZE=$(MEMORYSIZE) $(INCLUDES) $(TARGET) \
113 $(DEFINES) -E -P - >$@ 107 $(DEFINES) -E -P - >$@
114 108
115clean: 109clean:
116 @echo "cleaning chessbox" 110 $(call PRINTS,cleaning chessbox)rm -rf $(OBJDIR)/chessbox
117 @rm -rf $(OBJDIR)/chessbox 111 $(SILENT)rm -f $(OBJDIR)/chessbox.* $(DEPFILE)
118 @rm -f $(OBJDIR)/chessbox.* $(DEPFILE)
119 112
120-include $(DEPFILE) 113-include $(DEPFILE)