diff options
Diffstat (limited to 'apps')
-rw-r--r-- | apps/codecs/libmad/Makefile | 5 | ||||
-rw-r--r-- | apps/plugins/mpegplayer/Makefile | 22 |
2 files changed, 20 insertions, 7 deletions
diff --git a/apps/codecs/libmad/Makefile b/apps/codecs/libmad/Makefile index 13cde8f1f6..3a7be714ea 100644 --- a/apps/codecs/libmad/Makefile +++ b/apps/codecs/libmad/Makefile | |||
@@ -24,6 +24,11 @@ else | |||
24 | MADOPTS += -O2 | 24 | MADOPTS += -O2 |
25 | endif | 25 | endif |
26 | 26 | ||
27 | # We build libmad separately for mpegplayer | ||
28 | ifdef MPEGPLAYER | ||
29 | EXTRA_DEFINES += -DMPEGPLAYER | ||
30 | endif | ||
31 | |||
27 | CFLAGS = $(INCLUDES) $(GCCOPTS) $(TARGET_INC) $(MADOPTS) $(TARGET) \ | 32 | CFLAGS = $(INCLUDES) $(GCCOPTS) $(TARGET_INC) $(MADOPTS) $(TARGET) \ |
28 | $(EXTRA_DEFINES) -DMEM=${MEMORYSIZE} $(PROFILE_OPTS) | 33 | $(EXTRA_DEFINES) -DMEM=${MEMORYSIZE} $(PROFILE_OPTS) |
29 | 34 | ||
diff --git a/apps/plugins/mpegplayer/Makefile b/apps/plugins/mpegplayer/Makefile index 28691f4b17..7f4e2e31aa 100644 --- a/apps/plugins/mpegplayer/Makefile +++ b/apps/plugins/mpegplayer/Makefile | |||
@@ -32,9 +32,17 @@ OUTPUT = $(OUTDIR)/mpegplayer.rock | |||
32 | 32 | ||
33 | all: $(OUTPUT) | 33 | all: $(OUTPUT) |
34 | 34 | ||
35 | .PHONY: libmad-mpegplayer | ||
36 | |||
37 | $(BUILDDIR)/libmad-mpegplayer.a: libmad-mpegplayer | ||
38 | |||
39 | libmad-mpegplayer: | ||
40 | $(SILENT)mkdir -p $(OBJDIR)/libmad-mpegplayer | ||
41 | $(call PRINTS,MAKE in libmad for mpegplayer)$(MAKE) -C $(APPSDIR)/codecs/libmad MPEGPLAYER=1 OBJDIR=$(OBJDIR)/libmad-mpegplayer OUTPUT=$(BUILDDIR)/libmad-mpegplayer.a | ||
42 | |||
35 | ifndef SIMVER | 43 | ifndef SIMVER |
36 | $(OBJDIR)/mpegplayer.elf: $(OBJS) $(LINKFILE) | 44 | $(OBJDIR)/mpegplayer.elf: $(OBJS) $(LINKFILE) $(BUILDDIR)/libmad-mpegplayer.a |
37 | $(call PRINTS,LD $(@F))$(CC) $(CFLAGS) -o $@ $(OBJS) -L$(BUILDDIR) -lplugin -lmad -lgcc\ | 45 | $(call PRINTS,LD $(@F))$(CC) $(CFLAGS) -o $@ $(OBJS) -L$(BUILDDIR) -lplugin -lmad-mpegplayer -lgcc\ |
38 | -T$(LINKFILE) -Wl,-Map,$(OBJDIR)/mpegplayer.map | 46 | -T$(LINKFILE) -Wl,-Map,$(OBJDIR)/mpegplayer.map |
39 | 47 | ||
40 | $(OUTPUT): $(OBJDIR)/mpegplayer.elf | 48 | $(OUTPUT): $(OBJDIR)/mpegplayer.elf |
@@ -45,8 +53,8 @@ ifeq ($(SIMVER), x11) | |||
45 | ################################################### | 53 | ################################################### |
46 | # This is the X11 simulator version | 54 | # This is the X11 simulator version |
47 | 55 | ||
48 | $(OUTPUT): $(OBJS) | 56 | $(OUTPUT): $(OBJS) $(BUILDDIR)/libmad-mpegplayer.a |
49 | $(call PRINTS,LD $(@F))$(CC) $(CFLAGS) $(SHARED_FLAG) $(OBJS) -L$(BUILDDIR) -lplugin -lmad -o $@ | 57 | $(call PRINTS,LD $(@F))$(CC) $(CFLAGS) $(SHARED_FLAG) $(OBJS) -L$(BUILDDIR) -lplugin -lmad-mpegplayer -o $@ |
50 | ifeq ($(findstring CYGWIN,$(UNAME)),CYGWIN) | 58 | ifeq ($(findstring CYGWIN,$(UNAME)),CYGWIN) |
51 | # 'x' must be kept or you'll have "Win32 error 5" | 59 | # 'x' must be kept or you'll have "Win32 error 5" |
52 | # $ fgrep 5 /usr/include/w32api/winerror.h | head -1 | 60 | # $ fgrep 5 /usr/include/w32api/winerror.h | head -1 |
@@ -60,8 +68,8 @@ ifeq ($(SIMVER), sdl) | |||
60 | ################################################### | 68 | ################################################### |
61 | # This is the SDL simulator version | 69 | # This is the SDL simulator version |
62 | 70 | ||
63 | $(OUTPUT): $(OBJS) | 71 | $(OUTPUT): $(OBJS) $(BUILDDIR)/libmad-mpegplayer.a |
64 | $(call PRINTS,LD $(@F))$(CC) $(CFLAGS) $(SHARED_FLAG) $(OBJS) -L$(BUILDDIR) -lplugin -lmad -o $@ | 72 | $(call PRINTS,LD $(@F))$(CC) $(CFLAGS) $(SHARED_FLAG) $(OBJS) -L$(BUILDDIR) -lplugin -lmad-mpegplayer -o $@ |
65 | ifeq ($(findstring CYGWIN,$(UNAME)),CYGWIN) | 73 | ifeq ($(findstring CYGWIN,$(UNAME)),CYGWIN) |
66 | # 'x' must be kept or you'll have "Win32 error 5" | 74 | # 'x' must be kept or you'll have "Win32 error 5" |
67 | # $ fgrep 5 /usr/include/w32api/winerror.h | head -1 | 75 | # $ fgrep 5 /usr/include/w32api/winerror.h | head -1 |
@@ -76,7 +84,7 @@ else # end of sdl-simulator | |||
76 | DLLTOOLFLAGS = --export-all | 84 | DLLTOOLFLAGS = --export-all |
77 | DLLWRAPFLAGS = -s --entry _DllMain@12 --target=i386-mingw32 -mno-cygwin | 85 | DLLWRAPFLAGS = -s --entry _DllMain@12 --target=i386-mingw32 -mno-cygwin |
78 | 86 | ||
79 | $(OUTPUT): $(OBJS) | 87 | $(OUTPUT): $(OBJS) $(BUILDDIR)/libmad-mpegplayer.a |
80 | $(call PRINTS,DLL $(@F))$(DLLTOOL) $(DLLTOOLFLAGS) -z $(OBJDIR)/$*.def $(OBJS) | 88 | $(call PRINTS,DLL $(@F))$(DLLTOOL) $(DLLTOOLFLAGS) -z $(OBJDIR)/$*.def $(OBJS) |
81 | $(SILENT)@$(DLLWRAP) $(DLLWRAPFLAGS) --def $(OBJDIR)/$*.def $(OBJS) \ | 89 | $(SILENT)@$(DLLWRAP) $(DLLWRAPFLAGS) --def $(OBJDIR)/$*.def $(OBJS) \ |
82 | $(BUILDDIR)/libplugin.a -o $@ | 90 | $(BUILDDIR)/libplugin.a -o $@ |