Generate LED icons on the fly. Include SVG versions.
[fw/altos] / icon / Makefile.am
index af238ac42527da025ff403481c046ba58146b0b7..6efe3ecf4f688bfdf3d76de4586c5936a0dd78c6 100644 (file)
@@ -27,6 +27,17 @@ EEPROM_ICON  = $(EEPROM_NAME).svg
 TELEM_ICON     = $(TELEM_NAME).svg
 MPD_ICON       = $(MPD_NAME).svg
 
+LED_SVG = \
+       redoff.svg \
+       greenoff.svg \
+       greenled.svg \
+       grayon.svg \
+       grayled.svg \
+       redled.svg
+LED_PNG = $(LED_SVG:.svg=.png)
+
+LED_ICONS = $(LED_SVG) $(LED_PNG)
+
 # Files needed for Mac OSX icons
 
 MAC_AM_FILES   = $(shell for i in $(MAC_RES); do echo $(AM_NAME)-$$i.png; done)
@@ -109,7 +120,7 @@ java-telegps:
 
 fat: all $(ICO_FILES) $(ICNS_FILES) $(EXE_FILES)
 
-all-local: $(JAVA_FILES) $(AM_XPM)
+all-local: $(JAVA_FILES) $(AM_XPM) $(LED_ICONS)
 
 clean-local:
        $(RM) $(AM_NAME)-*.png $(TG_NAME)-*.png $(MP_NAME)-*.png
@@ -117,6 +128,7 @@ clean-local:
        $(RM) $(EEPROM_NAME)-*.png $(TELEM_NAME)-*.png $(MPD_NAME)-*.png
        $(RM) *.build *.ico *.rc *.icns *.o *.exe $(MPD_ICON)
        $(RM) altusmetrum.xpm
+       $(RM) $(LED_ICONS)
 
 if INSTALL_SHARED_MIME_INFO
 install-data-hook:
@@ -124,6 +136,9 @@ install-data-hook:
        update-icon-caches $(DESTDIR)$(ICON_THEME)
 endif
 
+$(LED_ICONS): led.5c
+       nickle led.5c $@
+
 $(MPD_ICON): $(MP_ICON)
        $(LN_S) $(MP_ICON) $@