diff options
Diffstat (limited to 'apps/plugins/Makefile')
-rw-r--r-- | apps/plugins/Makefile | 48 |
1 files changed, 23 insertions, 25 deletions
diff --git a/apps/plugins/Makefile b/apps/plugins/Makefile index a35bcf7dfd..371a04ef4b 100644 --- a/apps/plugins/Makefile +++ b/apps/plugins/Makefile | |||
@@ -67,27 +67,32 @@ $(DEPFILE): $(BITMAPLIBS) | |||
67 | dep: $(DEPFILE) | 67 | dep: $(DEPFILE) |
68 | 68 | ||
69 | $(BUILDDIR)/credits.raw: $(DOCSDIR)/CREDITS | 69 | $(BUILDDIR)/credits.raw: $(DOCSDIR)/CREDITS |
70 | @echo "create credits.raw" | 70 | $(call PRINTS,create credits.raw)perl credits.pl < $< > $@ |
71 | $(SILENT)perl credits.pl < $< > $@ | ||
72 | 71 | ||
73 | $(OBJDIR)/credits.o: credits.c $(BUILDDIR)/credits.raw | 72 | $(OBJDIR)/credits.o: credits.c $(BUILDDIR)/credits.raw |
74 | $(SILENT)mkdir -p $(dir $@) | 73 | $(SILENT)mkdir -p $(dir $@) |
75 | @echo "CC $<" | 74 | $(call PRINTS,CC $(<F))$(CC) $(CFLAGS) -I$(OBJDIR) -c $< -o $@ |
76 | $(SILENT)$(CC) $(CFLAGS) -I$(OBJDIR) -c $< -o $@ | ||
77 | 75 | ||
78 | build-bitmaps: | 76 | build-bitmapsmono: |
79 | $(SILENT)$(MAKE) -C bitmaps OBJDIR=$(OBJDIR)/bitmaps | 77 | $(call PRINTS,MAKE in plugins/bitmaps/mono)$(MAKE) -C bitmaps/mono OBJDIR=$(OBJDIR)/bitmaps/mono |
80 | 78 | ||
81 | $(BITMAPLIBS): build-bitmaps | 79 | build-bitmapsnative: |
80 | $(call PRINTS,MAKE in plugins/bitmaps/native)$(MAKE) -C bitmaps/native OBJDIR=$(OBJDIR)/bitmaps/native | ||
81 | |||
82 | build-bitmapsremotemono: | ||
83 | $(call PRINTS,MAKE in plugins/bitmaps/remote_mono)$(MAKE) -C bitmaps/remote_mono OBJDIR=$(OBJDIR)/bitmaps/remote_mono | ||
84 | |||
85 | build-bitmapsremotenative: | ||
86 | $(call PRINTS,MAKE in plugins/bitmaps/remote_native)$(MAKE) -C bitmaps/remote_native OBJDIR=$(OBJDIR)/bitmaps/remote_native | ||
87 | |||
88 | $(BITMAPLIBS): $(BUILDDIR)/libplugin%.a: build-% | ||
82 | 89 | ||
83 | ifndef SIMVER | 90 | ifndef SIMVER |
84 | $(OBJDIR)/%.elf: $(OBJDIR)/%.o $(LINKFILE) $(BUILDDIR)/libplugin.a $(BITMAPLIBS) | 91 | $(OBJDIR)/%.elf: $(OBJDIR)/%.o $(LINKFILE) $(BUILDDIR)/libplugin.a $(BITMAPLIBS) |
85 | @echo "LD $(notdir $@)" | 92 | $(call PRINTS,LD $(@F))$(CC) $(GCCOPTS) -O -nostdlib -o $@ $< -L$(BUILDDIR) $(CODECLIBS) -lplugin $(LINKBITMAPS) -lgcc -T$(LINKFILE) -Wl,--gc-sections -Wl,-Map,$(OBJDIR)/$*.map |
86 | $(SILENT)$(CC) $(GCCOPTS) -O -nostdlib -o $@ $< -L$(BUILDDIR) $(CODECLIBS) -lplugin $(LINKBITMAPS) -lgcc -T$(LINKFILE) -Wl,--gc-sections -Wl,-Map,$(OBJDIR)/$*.map | ||
87 | 93 | ||
88 | $(OBJDIR)/%.rock : $(OBJDIR)/%.elf | 94 | $(OBJDIR)/%.rock : $(OBJDIR)/%.elf |
89 | @echo "OBJCOPY $(notdir $@)" | 95 | $(call PRINTS,OBJCOPY $(@F))$(OC) -O binary $< $@ |
90 | $(SILENT)$(OC) -O binary $< $@ | ||
91 | else | 96 | else |
92 | 97 | ||
93 | ifeq ($(SIMVER), x11) | 98 | ifeq ($(SIMVER), x11) |
@@ -95,8 +100,7 @@ ifeq ($(SIMVER), x11) | |||
95 | # This is the X11 simulator version | 100 | # This is the X11 simulator version |
96 | 101 | ||
97 | $(OBJDIR)/%.rock : $(OBJDIR)/%.o $(BUILDDIR)/libplugin.a $(BITMAPLIBS) | 102 | $(OBJDIR)/%.rock : $(OBJDIR)/%.o $(BUILDDIR)/libplugin.a $(BITMAPLIBS) |
98 | @echo "LD $(notdir $@)" | 103 | $(call PRINTS,LD $(@F))$(CC) $(CFLAGS) $(SHARED_FLAG) $< -L$(BUILDDIR) $(CODECLIBS) -lplugin $(LINKBITMAPS) -o $@ |
99 | $(SILENT)$(CC) $(CFLAGS) $(SHARED_FLAG) $< -L$(BUILDDIR) $(CODECLIBS) -lplugin $(LINKBITMAPS) -o $@ | ||
100 | ifeq ($(findstring CYGWIN,$(UNAME)),CYGWIN) | 104 | ifeq ($(findstring CYGWIN,$(UNAME)),CYGWIN) |
101 | # 'x' must be kept or you'll have "Win32 error 5" | 105 | # 'x' must be kept or you'll have "Win32 error 5" |
102 | # $ fgrep 5 /usr/include/w32api/winerror.h | head -1 | 106 | # $ fgrep 5 /usr/include/w32api/winerror.h | head -1 |
@@ -111,8 +115,7 @@ ifeq ($(SIMVER), sdl) | |||
111 | # This is the SDL simulator version | 115 | # This is the SDL simulator version |
112 | 116 | ||
113 | $(OBJDIR)/%.rock : $(OBJDIR)/%.o $(BUILDDIR)/libplugin.a $(BITMAPLIBS) | 117 | $(OBJDIR)/%.rock : $(OBJDIR)/%.o $(BUILDDIR)/libplugin.a $(BITMAPLIBS) |
114 | @echo "LD $(notdir $@)" | 118 | $(call PRINTS,LD $(@F))$(CC) $(CFLAGS) $(SHARED_FLAG) $< -L$(BUILDDIR) $(CODECLIBS) -lplugin $(LINKBITMAPS) -o $@ |
115 | $(SILENT)$(CC) $(CFLAGS) $(SHARED_FLAG) $< -L$(BUILDDIR) $(CODECLIBS) -lplugin $(LINKBITMAPS) -o $@ | ||
116 | ifeq ($(findstring CYGWIN,$(UNAME)),CYGWIN) | 119 | ifeq ($(findstring CYGWIN,$(UNAME)),CYGWIN) |
117 | # 'x' must be kept or you'll have "Win32 error 5" | 120 | # 'x' must be kept or you'll have "Win32 error 5" |
118 | # $ fgrep 5 /usr/include/w32api/winerror.h | head -1 | 121 | # $ fgrep 5 /usr/include/w32api/winerror.h | head -1 |
@@ -128,8 +131,7 @@ DLLTOOLFLAGS = --export-all | |||
128 | DLLWRAPFLAGS = -s --entry _DllMain@12 --target=i386-mingw32 -mno-cygwin | 131 | DLLWRAPFLAGS = -s --entry _DllMain@12 --target=i386-mingw32 -mno-cygwin |
129 | 132 | ||
130 | $(OBJDIR)/%.rock : $(OBJDIR)/%.o $(BUILDDIR)/libplugin.a $(BITMAPLIBS) | 133 | $(OBJDIR)/%.rock : $(OBJDIR)/%.o $(BUILDDIR)/libplugin.a $(BITMAPLIBS) |
131 | @echo "DLL $(notdir $@)" | 134 | $(call PRINTS,DLL $(@F))$(DLLTOOL) $(DLLTOOLFLAGS) -z $(OBJDIR)/$*.def $< |
132 | $(SILENT)$(DLLTOOL) $(DLLTOOLFLAGS) -z $(OBJDIR)/$*.def $< | ||
133 | $(SILENT)$(DLLWRAP) $(DLLWRAPFLAGS) --def $(OBJDIR)/$*.def $< $(BUILDDIR)/libplugin.a $(BITMAPLIBS) \ | 135 | $(SILENT)$(DLLWRAP) $(DLLWRAPFLAGS) --def $(OBJDIR)/$*.def $< $(BUILDDIR)/libplugin.a $(BITMAPLIBS) \ |
134 | $(patsubst -l%,$(BUILDDIR)/lib%.a,$(CODECLIBS)) -o $@ | 136 | $(patsubst -l%,$(BUILDDIR)/lib%.a,$(CODECLIBS)) -o $@ |
135 | ifeq ($(findstring CYGWIN,$(UNAME)),CYGWIN) | 137 | ifeq ($(findstring CYGWIN,$(UNAME)),CYGWIN) |
@@ -147,23 +149,19 @@ endif # end of simulator section | |||
147 | include $(TOOLSDIR)/make.inc | 149 | include $(TOOLSDIR)/make.inc |
148 | 150 | ||
149 | $(BUILDDIR)/libplugin.a: | 151 | $(BUILDDIR)/libplugin.a: |
150 | @echo "MAKE in plugin/lib" | ||
151 | $(SILENT)mkdir -p $(OBJDIR)/lib | 152 | $(SILENT)mkdir -p $(OBJDIR)/lib |
152 | $(SILENT)$(MAKE) -C lib OBJDIR=$(OBJDIR)/lib | 153 | $(call PRINTS,MAKE in plugin/lib)$(MAKE) -C lib OBJDIR=$(OBJDIR)/lib |
153 | 154 | ||
154 | $(LINKFILE): $(LDS) | 155 | $(LINKFILE): $(LDS) |
155 | @echo "build $(notdir $@)" | 156 | $(call PRINTS,build $(@F))cat $< | $(CC) -DMEMORYSIZE=$(MEMORYSIZE) $(INCLUDES) $(TARGET) $(DEFINES) -E -P - >$@ |
156 | $(SILENT)cat $< | $(CC) -DMEMORYSIZE=$(MEMORYSIZE) $(INCLUDES) $(TARGET) $(DEFINES) -E -P - >$@ | ||
157 | 157 | ||
158 | $(SUBDIRS): $(BITMAPLIBS) | 158 | $(SUBDIRS): $(BITMAPLIBS) |
159 | @echo "MAKE in $@" | ||
160 | $(SILENT)mkdir -p $(OBJDIR)/$@ | 159 | $(SILENT)mkdir -p $(OBJDIR)/$@ |
161 | $(SILENT)$(MAKE) -C $@ OUTDIR=$(OBJDIR) OBJDIR=$(OBJDIR)/$@ \ | 160 | $(call PRINTS,MAKE in $@)$(MAKE) -C $@ OUTDIR=$(OBJDIR) OBJDIR=$(OBJDIR)/$@ \ |
162 | LINKBITMAPS="$(LINKBITMAPS)" BITMAPLIBS="$(BITMAPLIBS)" | 161 | LINKBITMAPS="$(LINKBITMAPS)" BITMAPLIBS="$(BITMAPLIBS)" |
163 | 162 | ||
164 | clean: | 163 | clean: |
165 | @echo "cleaning plugins" | 164 | $(call PRINTS,cleaning plugins)rm -f $(ROCKS) $(LINKFILE) $(OBJDIR)/*.rock $(DEPFILE) $(ELFS) \ |
166 | $(SILENT)rm -f $(ROCKS) $(LINKFILE) $(OBJDIR)/*.rock $(DEPFILE) $(ELFS) \ | ||
167 | $(BUILDDIR)/credits.raw $(OBJS) $(DEFS) | 165 | $(BUILDDIR)/credits.raw $(OBJS) $(DEFS) |
168 | $(SILENT)$(MAKE) -C lib clean OBJDIR=$(OBJDIR)/lib | 166 | $(SILENT)$(MAKE) -C lib clean OBJDIR=$(OBJDIR)/lib |
169 | $(SILENT)$(MAKE) -C bitmaps/mono clean OBJDIR=$(OBJDIR)/bitmaps/mono | 167 | $(SILENT)$(MAKE) -C bitmaps/mono clean OBJDIR=$(OBJDIR)/bitmaps/mono |