altos: get ao_max6691 driver working
[fw/altos] / icon / Makefile.am
index c08e9236e91ac75392edd300dea1f9440d1af2e4..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) $@
 
@@ -150,14 +165,21 @@ SUFFIXES=.svg .build .icns .ico .rc .o .exe
        icotool -c -o $@ $(shell for i in $(WIN_RES); do echo $*-$$i.png; done)
 
 .ico.rc:
-       echo '101 ICON "$*.ico"' > $@
+       ./make-rc "$*" $(VERSION) > $@
 
 
 MINGCC32=i686-w64-mingw32-gcc
 MINGWINDRES=i686-w64-mingw32-windres
+MINGFLAGS=-Wall -DWINDOWS -mwindows
+MINGLIBS=-lshlwapi
 
 .rc.o:
        $(MINGWINDRES) $*.rc $@
 
 .o.exe:
-       $(MINGCC32) -o $@ windows-stub.c $*.o
+       $(MINGCC32) -o $@ $(MINGFLAGS) windows-stub.o $*.o $(MINGLIBS)
+
+$(EXE_FILES): windows-stub.o make-rc
+
+windows-stub.o: windows-stub.c
+       $(MINGCC32) -c $(MINGFLAGS) windows-stub.c