VERS = tuipeer-1.1.1
CXXFLAGS = -O -I./include #-fexternal-templates
LDFLAGS= -Llib -Lfsp # -Lpcurses

OBJS =	tuipeer.o toolkit.o component.o menucomp.o wincomp.o \
	textdraw.o textcomp.o browse.o textselect.o textbrowse.o textedit.o \
	listcomp.o pt.o windraw.o container.o remotepeer.o canvas.o \
	scrollbar.o version.o

tuipeer: $(OBJS)
	gcc $(OBJS) \
	-o tuipeer $(LDFLAGS) -lg++ -lb++ -lfs -lcurses

libcomp.a: ${OBJS:%=libcomp.a(%)}

# Q is a simple editor to test the TextArea functionality without
# Java.

q:	q.o libcomp.a
	gcc q.o libcomp.a -o q $(LDFLAGS) -lg++ -lb++ -lfs -lcurses

depend:
	g++ -MM $(CXXFLAGS) $(OBJS:%.o=%.cc) >depend.d

include depend.d

list:
	find $(VERS) -follow -name "*.[schd]*" -o -name makefile \
	-o -name INFO -o -name README -o -name LICENSE -o -name INSTALL \
	-o -name TODO >list

tar:	list
	tar cvTf list - | gzip -v >$(VERS).src.tar.gz

zip:
	java ZipLock -a tuiawt.zip -x sun bmsi.tui.TUIKit bmsi.tui.TestFrame 
