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