diff options
author | Teruaki Kawashima <teru@rockbox.org> | 2010-11-21 13:47:56 +0000 |
---|---|---|
committer | Teruaki Kawashima <teru@rockbox.org> | 2010-11-21 13:47:56 +0000 |
commit | e5b1a7d4237a9006b6c49c9c1c13b292ca4ecf7c (patch) | |
tree | f0b9dd1cba0a4ee70afd8b6da64a05286f76c380 /apps/plugins/imageviewer/imageviewer.make | |
parent | eef21cb18ae4bc7cdf83830554a848e0c733a73d (diff) | |
download | rockbox-e5b1a7d4237a9006b6c49c9c1c13b292ca4ecf7c.tar.gz rockbox-e5b1a7d4237a9006b6c49c9c1c13b292ca4ecf7c.zip |
FS#6321: Universal Image Viewer
This unifies jpeg viewer, png viewer, and bmp viewer to one plugin, image viewer, so that you can navigate through different image formats.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28626 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/plugins/imageviewer/imageviewer.make')
-rw-r--r-- | apps/plugins/imageviewer/imageviewer.make | 45 |
1 files changed, 44 insertions, 1 deletions
diff --git a/apps/plugins/imageviewer/imageviewer.make b/apps/plugins/imageviewer/imageviewer.make index 76af8d24e5..d06bbfd571 100644 --- a/apps/plugins/imageviewer/imageviewer.make +++ b/apps/plugins/imageviewer/imageviewer.make | |||
@@ -10,7 +10,50 @@ | |||
10 | IMGVSRCDIR := $(APPSDIR)/plugins/imageviewer | 10 | IMGVSRCDIR := $(APPSDIR)/plugins/imageviewer |
11 | IMGVBUILDDIR := $(BUILDDIR)/apps/plugins/imageviewer | 11 | IMGVBUILDDIR := $(BUILDDIR)/apps/plugins/imageviewer |
12 | 12 | ||
13 | # include actual viewer's make file | 13 | ROCKS += $(IMGVBUILDDIR)/imageviewer.rock |
14 | |||
15 | IMGV_SRC := $(call preprocess, $(IMGVSRCDIR)/SOURCES) | ||
16 | IMGV_OBJ := $(call c2obj, $(IMGV_SRC)) | ||
17 | |||
18 | # add source files to OTHER_SRC to get automatic dependencies | ||
19 | OTHER_SRC += $(IMGV_SRC) | ||
20 | |||
21 | $(IMGVBUILDDIR)/imageviewer.rock: $(IMGV_OBJ) | ||
22 | |||
23 | IMGDECFLAGS = $(PLUGINFLAGS) -DIMGDEC | ||
24 | |||
25 | # include decoder's make from each subdir | ||
14 | IMGVSUBDIRS := $(call preprocess, $(IMGVSRCDIR)/SUBDIRS) | 26 | IMGVSUBDIRS := $(call preprocess, $(IMGVSRCDIR)/SUBDIRS) |
15 | $(foreach dir,$(IMGVSUBDIRS),$(eval include $(dir)/$(notdir $(dir)).make)) | 27 | $(foreach dir,$(IMGVSUBDIRS),$(eval include $(dir)/$(notdir $(dir)).make)) |
16 | 28 | ||
29 | IMGDECLDFLAGS = -T$(PLUGINLINK_LDS) -Wl,--gc-sections -Wl,-Map,$(IMGVBUILDDIR)/$*.refmap | ||
30 | |||
31 | ifndef APP_TYPE | ||
32 | IMGDEC_OUTLDS = $(IMGVBUILDDIR)/%.link | ||
33 | IMGDEC_OVLFLAGS = -T$(IMGVBUILDDIR)/$*.link -Wl,--gc-sections -Wl,-Map,$(IMGVBUILDDIR)/$*.map | ||
34 | else | ||
35 | IMGDEC_OVLFLAGS = $(PLUGINLDFLAGS) | ||
36 | endif | ||
37 | |||
38 | $(IMGVBUILDDIR)/%.ovl: $(IMGDEC_OUTLDS) | ||
39 | $(call PRINTS,LD $(@F))$(CC) $(IMGDECFLAGS) -o $(IMGVBUILDDIR)/$*.elf \ | ||
40 | $(filter-out $(PLUGIN_CRT0),$(filter %.o, $^)) \ | ||
41 | $(filter %.a, $+) \ | ||
42 | -lgcc $(IMGDEC_OVLFLAGS) | ||
43 | ifdef APP_TYPE | ||
44 | $(SILENT)cp $(IMGVBUILDDIR)/$*.elf $@ | ||
45 | else | ||
46 | $(SILENT)$(OC) -O binary $(IMGVBUILDDIR)/$*.elf $@ | ||
47 | endif | ||
48 | |||
49 | # rule to create reference map for image decoder | ||
50 | $(IMGVBUILDDIR)/%.refmap: $(APPSDIR)/plugin.h $(IMGVSRCDIR)/imageviewer.h $(PLUGINLINK_LDS) $(PLUGINLIB) $(PLUGINBITMAPLIB) | ||
51 | $(call PRINTS,LD $(@F))$(CC) $(IMGDECFLAGS) -o /dev/null \ | ||
52 | $(filter %.o, $^) \ | ||
53 | $(filter %.a, $+) \ | ||
54 | -lgcc $(IMGDECLDFLAGS) | ||
55 | |||
56 | $(IMGVBUILDDIR)/%.link: $(PLUGIN_LDS) $(IMGVBUILDDIR)/%.refmap | ||
57 | $(call PRINTS,PP $(@F))$(call preprocess2file,$<,$@,-DIMGVDECODER_OFFSET=$(shell \ | ||
58 | $(TOOLSDIR)/ovl_offset.pl $(IMGVBUILDDIR)/$*.refmap)) | ||
59 | |||