Commit a7aa2b51 authored by Vincent Mailhol's avatar Vincent Mailhol Committed by Helge Deller
Browse files

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: default avatarVincent Mailhol <mailhol@kernel.org>
Signed-off-by: default avatarHelge Deller <deller@gmx.de>
parent 672b3521
Loading
Loading
Loading
Loading
+7 −4
Original line number Diff line number Diff line
@@ -22,13 +22,16 @@ hostprogs := pnmtologo

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

$(obj)/%.c: $(src)/%.pbm $(obj)/pnmtologo FORCE
	$(call if_changed,logo)
	$(call if_changed,logo,mono)

$(obj)/%.c: $(src)/%.ppm $(obj)/pnmtologo FORCE
	$(call if_changed,logo)
$(obj)/%_vga16.c: $(src)/%_vga16.ppm $(obj)/pnmtologo FORCE
	$(call if_changed,logo,vga16)

$(obj)/%_clut224.c: $(src)/%_clut224.ppm $(obj)/pnmtologo FORCE
	$(call if_changed,logo,clut224)

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