home *** CD-ROM | disk | FTP | other *** search
/ Chip 2001 Mobile / Chip_Mobile_2001.iso / palm / spiele / argon / argon.exe / src / graphics / Makefile < prev    next >
Encoding:
Makefile  |  2000-01-23  |  2.5 KB  |  72 lines

  1. #
  2. #  Makefile
  3. #
  4. #  T.Harbaum@tu-bs.de - http://www.ibr.cs.tu-bs.de/~harbaum/pilot
  5. #
  6. #  This program is distributed in the hope that it will be useful,
  7. #  but WITHOUT ANY WARRANTY; without even the implied warranty of
  8. #  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  9. #  GNU General Public License for more details.
  10. #
  11.  
  12. # $@ = target
  13. # $< = first dep
  14. # $? = all dep
  15. # $* = stem
  16.  
  17. BACK = ../back0000.bin
  18.  
  19. IMAG = ../imag0000.bin ../imag0001.bin ../imag0002.bin ../imag0003.bin\
  20.        ../imag0004.bin ../imag0005.bin ../imag0006.bin ../imag0007.bin\
  21.        ../imag0008.bin ../imag0009.bin ../imag000a.bin ../imag000b.bin\
  22.        ../imag000c.bin ../imag000d.bin
  23.  
  24. SPRT = ../sprt0000.bin ../sprt0001.bin ../sprt0002.bin ../sprt0003.bin\
  25.        ../sprt0004.bin ../sprt0005.bin ../sprt0006.bin ../sprt0007.bin\
  26.        ../sprt0008.bin ../sprt0009.bin ../sprt000a.bin ../sprt000b.bin\
  27.        ../sprt000c.bin ../sprt000d.bin ../sprt000e.bin ../sprt000f.bin\
  28.        ../sprt0010.bin ../sprt0011.bin ../sprt0012.bin ../sprt0013.bin\
  29.        ../sprt0014.bin    
  30.  
  31. IMAGCONV = -gamma 0.5
  32.  
  33. all: $(BACK) $(IMAG) $(SPRT) ../graphics.h
  34.  
  35. ../graphics.h: $(BACK) $(IMAG) $(SPRT)
  36.     echo "/* graphics.h - autogenerated */" > ../graphics.h
  37.     echo "#define GRAPHIC_BACK `ls $(BACK) | wc -w`" >> ../graphics.h
  38.     echo "#define GRAPHIC_IMAG `ls $(IMAG) | wc -w`" >> ../graphics.h
  39.     echo "#define GRAPHIC_SPRT `ls $(SPRT) | wc -w`" >> ../graphics.h
  40.  
  41. ../%.bin: %_gr.bmp bmp2bin
  42.     ./bmp2bin $< $@
  43.  
  44. %_gr.bmp: %.bmp grey
  45.     ./grey $< $@
  46.  
  47. %_gr.bmp: %_l.gif
  48.     convert $(IMAGCONV) +compress $< $@
  49.  
  50. %.bmp: %.gif
  51.     convert +compress $< $@
  52.  
  53. bmp2bin: bmp2bin.c
  54.  
  55. grey: grey.c
  56.  
  57. clean::
  58.     rm -f bmp2bin grey back0000.bmp *~
  59.     rm -f *_gr.bmp *.bin ../graphics.h
  60.     rm -rf .xvpics
  61.  
  62. edit_level::
  63.     for i in imag*_l.gif  ; do convert $(IMAGCONV) -crop 16x16+0+0 $$i GRAY:bd`echo $$i | cut -b 5-8`.raw ; done
  64.     for i in imag*_gr.gif ; do convert -crop 16x16+0+0 $$i GRAY:bd`echo $$i | cut -b 5-8`.raw ; done
  65.     for i in imag*.gif ; do convert -negate -crop 16x16+18+0 $$i GRAY:bm`echo $$i | cut -b 5-8`.raw ; done
  66.     for i in imag*.gif ; do cat bd`echo $$i | cut -b 5-8`.raw bd`echo $$i | cut -b 5-8`.raw bd`echo $$i | cut -b 5-8`.raw bm`echo $$i | cut -b 5-8`.raw > button`echo $$i | cut -b 5-8`.raw ; done
  67.     for i in imag*.gif ; do convert -size 16x16 -interlace plane RGBA:button`echo $$i | cut -b 5-8`.raw button`echo $$i | cut -b 5-8`.gif; done
  68.     rm bd????.raw bm????.raw button????.raw
  69.     convert -crop 160x160+16+0 back0000.gif buttonback.gif
  70.     ./argoned ../levl0000.lev
  71.     rm button*
  72.