# Makefile for textf, a popup menu demonstration

LIBTEXTFOBJS=textf.o textf_base.o
IFLAGS=-I$(VISUROOT)/src/xdclass/h
CFLAGS=
GENCFILES=textf_base.h textf_base.c

all: libtextf.a textf.h textf_base.h

textf_base.c:
	visu -C $@ -f textf_base.xd

textf_base.h:
	visu -E $@ -f textf_base.xd

textf_base.o: textf_base.h textf_base.c
	$(CCC) -c $(CFLAGS) $(IFLAGS) textf_base.c

textf.o: textf_base.h textf.h textf.c
	$(CCC) -c $(CFLAGS) $(IFLAGS) textf.c

libtextf.a: $(LIBTEXTFOBJS)
	rm -f $@
	ar cru $@ $(LIBTEXTFOBJS)
	-ranlib $@

clean:
	rm -f textf_base.c textf_base.h
	rm -f textf_base.o textf.o
	rm -f libtextf.a
