sourceimage = addresslabel.rgb\
	birthdaylabel.rgb\
	day.rgb\
	edit2n.rgb\
	editn.rgb\
	femal.rgb\
	frameh.rgb\
	framen.rgb\
	male.rgb\
	clubidlabel.rgb\
	month.rgb\
	namelabel.rgb\
	phonelabel.rgb\
	sexlabel.rgb\
	okh.rgb\
	okn.rgb\
	buttom.rgb\
	top.rgb\
	discardh.rgb\
	discardn.rgb\
	bgalphanum.rgb\
	bgchinese.rgb\
	a_helpb.rgb\
	b_helpb.rgb\
	r_helpb.rgb\
	z_helpb.rgb\
	a_helpt.rgb\
	b_helpt.rgb\
	r_helpt.rgb\
	z_helpt.rgb\
	sex_no.rgb\
	sex_ok.rgb\
	shenmubutton.rgb\
	shenmubuttonh.rgb\
	yunmubutton.rgb\
	yunmubuttonh.rgb\
	year.rgb\
	t0.rgb\
	t1.rgb\
	t2.rgb\
	t3.rgb\
	t4.rgb\
	t5.rgb\
	t6.rgb\
	t7.rgb\
	t8.rgb\
	t9.rgb\
	tua.rgb tub.rgb tuc.rgb tud.rgb tue.rgb tuf.rgb tug.rgb tuh.rgb tui.rgb tuj.rgb tuk.rgb tul.rgb tum.rgb\
	tun.rgb tuo.rgb tup.rgb tuq.rgb tur.rgb tus.rgb tut.rgb tuu.rgb tuv.rgb tuw.rgb tux.rgb tuy.rgb tuz.rgb\
	tla.rgb tlb.rgb tlc.rgb tld.rgb tle.rgb tlf.rgb tlg.rgb tlh.rgb tli.rgb tlj.rgb tlk.rgb tll.rgb tlm.rgb\
	tln.rgb tlo.rgb tlp.rgb tlq.rgb tlr.rgb tls.rgb tlt.rgb tlu.rgb tlv.rgb tlw.rgb tlx.rgb tly.rgb tlz.rgb\
	tsh.rgb tzh.rgb tch.rgb\
	tya.rgb\
	tyai.rgb\
	tyan.rgb\
	tyang.rgb\
	tyao.rgb\
	tye.rgb\
	tyei.rgb\
	tyen.rgb\
	tyeng.rgb\
	tyi.rgb\
	tyia.rgb\
	tyian.rgb\
	tyiang.rgb\
	tyiao.rgb\
	tyie.rgb\
	tyin.rgb\
	tying.rgb\
	tyiong.rgb\
	tyiu.rgb\
	tyo.rgb\
	tyong.rgb\
	tyou.rgb\
	tyu.rgb\
	tyua.rgb\
	tyuai.rgb\
	tyuan.rgb\
	tyuang.rgb\
	tyue.rgb\
	tyui.rgb\
	tyun.rgb\
	tyuo.rgb\
	tyv.rgb\
	tyve.rgb\
	tyvn.rgb\
	tyn.rgb\
	tyng.rgb\
	bottombar.rgb\
	topbar.rgb\
	errorwrite.rgb\
	errorread.rgb\
	leftarrow.rgb\
	rightarrow.rgb\
	returncursor.rgb\
	wn.rgb\
	wy.rgb\
	wsave.rgb\
	switchEnglish.rgb\
	switchChinese.rgb\
	b_helpdelete.rgb\
	b_helpreturn.rgb\
	l_helpb.rgb\
	l_helpt.rgb\
	club.rgb\
	clubidframe.rgb\
	clubtitle.rgb\
	space.rgb\
	warningbg.rgb\
	mainbg.rgb\
	glyph16x16.rgb\
	wdrop.rgb\
	rd_helpb.rgb\
	u_helpb.rgb\
	u_helpt.rgb\
	d_helpb.rgb\
	d_helpt.rgb\
	boy.rgb\
	girl.rgb\
	glyph.rgb\
	defocuscursor.rgb
source32image = cursor.rgb
#		defocuscursor.rgb

header32tex = $(source32image:.rgb=.tex)	
headertex = $(sourceimage:.rgb=.tex)
texdir = tex
all:$(headertex) $(header32tex)

$(headertex):%.tex:%.rgb
	../gzimg.pl RGBA 16 $^ ../$(texdir)/$@ $(@:.tex=_img) $(@:.tex=_size)
#	rgb2c  -F -f RGBA -s 16 -m $(@:.tex=_tex) $^ >../$(texdir)/$@
#	rgb2c -o RAW -F -f RGBA -s 16 -m $(@:.tex=_tex) $^|asciitobinary.pl >../$(texdir)/$@
#	gzip -c -n ../$(texdir)/$@ >../$(texdir)/$(@:.tex=.gex)   
#	binarytoascii.pl <../$(texdir)/$(@:.tex=.gex) >../$(texdir)/$@
#	rm -f ../$(texdir)/$(@:.tex=.gex)
$(header32tex):%.tex:%.rgb
#	gzimg.pl RGBA 32 $^ ../$(texdir)/$@ $(@.tex=_img) $(@:.tex=_size)
	rgb2c -F -f RGBA -s 32 -m $(@:.tex=_tex) $^ >../$(texdir)/$@
.PHONY:clean
clean:
	rm -f ../$(headertex)
