Makefile 554 B

1234567891011121314151617181920212223
  1. #!/usr/bin/make -f
  2. NAME := wpa_gui
  3. SVG := $(NAME).svg
  4. SIZES := 16x16 22x22 32x32 48x48 64x64 128x128
  5. ICONS := $(addsuffix .png,$(SIZES))
  6. ICONS += $(addsuffix .xpm,16x16 32x32)
  7. all: $(ICONS)
  8. %.png:
  9. mkdir -p hicolor/$(@:.png=)/apps/
  10. inkscape $(SVG) --without-gui \
  11. --export-width=$(word 1,$(subst x, ,$(@:.png=))) \
  12. --export-height=$(word 2,$(subst x, ,$(@:.png=))) \
  13. --export-png=hicolor/$(@:.png=)/apps/$(NAME).png
  14. %.xpm:
  15. mkdir -p pixmaps/
  16. convert hicolor/$(@:.xpm=)/apps/$(NAME).png pixmaps/$@
  17. clean:
  18. $(RM) -r pixmaps hicolor