Skip to content

Commit a7aa2b5

Browse files
vincent-mailholhdeller
authored andcommitted
video/logo: add a type parameter to the logo makefile function
When translating a portable pixmap file into a .c file, the pnmtologo tool expects to receive the image type (either mono, vga16 or clut224) as an argument under the -t option. Currently, this information is stored in the file name. Because we will allow for custom logo in an upcoming change, it is preferable to decouple the image name from its type. Add a new $2 parameter to the Makefile logo function which contains the image type. Update all the individual targets to provide this new argument. Signed-off-by: Vincent Mailhol <mailhol@kernel.org> Signed-off-by: Helge Deller <deller@gmx.de>
1 parent 672b352 commit a7aa2b5

1 file changed

Lines changed: 7 additions & 4 deletions

File tree

drivers/video/logo/Makefile

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,16 @@ hostprogs := pnmtologo
2222

2323
# Create commands like "pnmtologo -t mono -n logo_mac_mono -o ..."
2424
quiet_cmd_logo = LOGO $@
25-
cmd_logo = $(obj)/pnmtologo -t $(lastword $(subst _, ,$*)) -n $* -o $@ $<
25+
cmd_logo = $(obj)/pnmtologo -t $2 -n $* -o $@ $<
2626

2727
$(obj)/%.c: $(src)/%.pbm $(obj)/pnmtologo FORCE
28-
$(call if_changed,logo)
28+
$(call if_changed,logo,mono)
2929

30-
$(obj)/%.c: $(src)/%.ppm $(obj)/pnmtologo FORCE
31-
$(call if_changed,logo)
30+
$(obj)/%_vga16.c: $(src)/%_vga16.ppm $(obj)/pnmtologo FORCE
31+
$(call if_changed,logo,vga16)
32+
33+
$(obj)/%_clut224.c: $(src)/%_clut224.ppm $(obj)/pnmtologo FORCE
34+
$(call if_changed,logo,clut224)
3235

3336
# generated C files
3437
targets += *_mono.c *_vga16.c *_clut224.c

0 commit comments

Comments
 (0)