Commit e3c639b8 authored by Masahiro Yamada's avatar Masahiro Yamada

video/logo: simplify cmd_logo

Shorten the code. It still works in the same way.
Signed-off-by: default avatarMasahiro Yamada <yamada.masahiro@socionext.com>
parent c25f867d
...@@ -22,20 +22,15 @@ pnmtologo := scripts/pnmtologo ...@@ -22,20 +22,15 @@ pnmtologo := scripts/pnmtologo
# Create commands like "pnmtologo -t mono -n logo_mac_mono -o ..." # Create commands like "pnmtologo -t mono -n logo_mac_mono -o ..."
quiet_cmd_logo = LOGO $@ quiet_cmd_logo = LOGO $@
cmd_logo = $(pnmtologo) \ cmd_logo = $(pnmtologo) -t $(lastword $(subst _, ,$*)) -n $* -o $@ $<
-t $(patsubst $*_%,%,$(notdir $(basename $<))) \
-n $(notdir $(basename $<)) -o $@ $<
$(obj)/%_mono.c: $(src)/%_mono.pbm $(pnmtologo) FORCE $(obj)/%.c: $(src)/%.pbm $(pnmtologo) FORCE
$(call if_changed,logo) $(call if_changed,logo)
$(obj)/%_vga16.c: $(src)/%_vga16.ppm $(pnmtologo) FORCE $(obj)/%.c: $(src)/%.ppm $(pnmtologo) FORCE
$(call if_changed,logo) $(call if_changed,logo)
$(obj)/%_clut224.c: $(src)/%_clut224.ppm $(pnmtologo) FORCE $(obj)/%.c: $(src)/%.pgm $(pnmtologo) FORCE
$(call if_changed,logo)
$(obj)/%_gray256.c: $(src)/%_gray256.pgm $(pnmtologo) FORCE
$(call if_changed,logo) $(call if_changed,logo)
# generated C files # generated C files
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment