#
# The W Toolkit - Makefile
#

CC=gcc
CPPFLAGS=-I..
CFLAGS=-Wall -O -g
LDLIBS=-L.. -lWt -lW -lsocket

PROGS=buttons drawables timer_io viewports draw w4 iconeditor textinput
 
all: $(PROGS)

drawables: drawables.o ../libWt.a
	$(CC) $< -o $@ $(LDLIBS)
#	$(CC) -B/usr/bin/sym- $< -o $@.sym $(LDLIBS)

viewports: viewports.o ../libWt.a
	$(CC) $< -o $@ $(LDLIBS)
#	$(CC) -B/usr/bin/sym- $< -o $@.sym $(LDLIBS)

timer_io: timer_io.o ../libWt.a
	$(CC) $< -o $@ $(LDLIBS)
#	$(CC) -B/usr/bin/sym- $< -o $@.sym $(LDLIBS)

buttons: buttons.o ../libWt.a
	$(CC) $< -o $@ $(LDLIBS)
#	$(CC) -B/usr/bin/sym- $< -o $@.sym $(LDLIBS)

draw: draw.o ../libWt.a
	$(CC) $< -o $@ $(LDLIBS)
#	$(CC) -B/usr/bin/sym- $< -o $@.sym $(LDLIBS)

w4: w4.o ../libWt.a
	$(CC) $< -o $@ $(LDLIBS)
	$(CC) -B/usr/bin/sym- $< -o $@.sym $(LDLIBS)

iconeditor: iconeditor.o ../libWt.a
	$(CC) $< -o $@ $(LDLIBS)
	$(CC) -B/usr/bin/sym- $< -o $@.sym $(LDLIBS)

textinput: textinput.o ../libWt.a
	$(CC) $< -o $@ $(LDLIBS)
	$(CC) -B/usr/bin/sym- $< -o $@.sym $(LDLIBS)

clean:
	rm -f *.o

distclean:
	rm -f *.o *.sym $(PROGS)
