2008-03-03 08:22:58 +01:00
|
|
|
/BITMAP/ {
|
|
|
|
gsub(/\"bitmaps\//, "", $3)
|
|
|
|
gsub(/\"/, "", $3)
|
|
|
|
image[$1] = $3
|
|
|
|
}
|
|
|
|
|
|
|
|
END {
|
|
|
|
printf(" \
|
2009-01-24 16:58:38 +01:00
|
|
|
all: bmp2xpm \n \
|
2008-03-11 06:41:14 +01:00
|
|
|
.PHONY: all bmp2xpm \n \
|
2008-12-27 09:06:29 +01:00
|
|
|
CONVERT ?= %s \n \
|
|
|
|
", BIN_CONVERT)
|
2008-03-03 08:22:58 +01:00
|
|
|
|
|
|
|
for (v in image) {
|
|
|
|
printf("%s_xpm.xpm: %s\n", v, image[v])
|
2009-05-04 08:51:02 +02:00
|
|
|
printf(" $(CONVERT) -transparent \"#c0c0c0\" %s xpm:- \\\
|
|
|
|
| sed \"2 s/^static char \\*xpm__\\[\\] =/const char \\*"v"_xpm\\[\\] =/\" \\\
|
|
|
|
> %s_xpm.xpm\n\n", image[v], v)
|
2008-03-03 08:22:58 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
printf("bmp2xpm:")
|
|
|
|
for (v in image)
|
|
|
|
printf(" %s_xpm.xpm", v)
|
|
|
|
}
|