# for Athena Widgets and Linux:

CPPFLAGS = -I/usr/include/X11/Xaw -I/usr/include/X11 -DLINUX -g 
# for Linux (or if you use GNU C++):  add -lg++ to the following:
LIBFLAGS =  -lXaw -lXau -lXt -lX11 -lXmu     -lg++ -lm

# for Motif:
#CPPFLAGS = -I/usr/include/X11/Xaw -I/usr/include/X11  -g   -DMOTIF
# for Linux (or if you use GNU C++):  add -lg++ to the following:
#LIBFLAGS = -lXm -lXt -lX11 -lXmu 

# for GNU compiler:
CC=gcc
# FOR SYSTEMS WITH CC:
#CC=CC

all: test chess3d draw hand textbr

test: test.o applib.o int_vec.o grapher.o tplot.o
	$(CC) -o test test.o applib.o int_vec.o grapher.o tplot.o $(LIBFLAGS)

test.o: test.cxx
	$(CC) -c test.cxx $(CPPFLAGS)

chess3d: chess3d.o applib.o int_vec.o
	$(CC) -o chess3d chess3d.o applib.o int_vec.o  $(LIBFLAGS)

chess3d.o: chess3d.cxx
	$(CC) -c chess3d.cxx $(CPPFLAGS)


textbr: textbr.o applib.o textind.o char_v.o
	$(CC) -o textbr textbr.o textind.o applib.o char_v.o $(LIBFLAGS)

draw: draw.o applib.o int_vec.o draw.o
	$(CC) -o draw draw.o applib.o int_vec.o $(LIBFLAGS)

hand: hand.o applib.o int_vec.o hand.o tneural.o double_v.o tplot.o
	$(CC) -o hand hand.o applib.o int_vec.o tneural.o double_v.o tplot.o $(LIBFLAGS)

applib.o: applib.cxx  applib.h
	$(CC) -c applib.cxx $(CPPFLAGS)

char_v.o: char_v.cxx char_v.h
	$(CC) -c char_v.cxx $(CPPFLAGS)

int_vec.o: int_vec.cxx int_vect.h
	$(CC) -c int_vec.cxx $(CPPFLAGS)

double_v.o: double_v.cxx double_v.h
	$(CC) -c double_v.cxx $(CPPFLAGS)

grapher.o: grapher.cxx grapher.h
	$(CC) -c grapher.cxx $(CPPFLAGS)

tplot.o: tplot.cxx tplot.h
	$(CC) -c tplot.cxx $(CPPFLAGS)

hand.o: hand.cxx
	$(CC) -c hand.cxx $(CPPFLAGS)

draw.o: draw.cxx
	$(CC) -c draw.cxx $(CPPFLAGS)

textbr.o: textbr.cxx
	$(CC) -c textbr.cxx $(CPPFLAGS)

textind.o: textind.cxx textind.h
	$(CC) -c textind.cxx $(CPPFLAGS)

tneural.o: tneural.cxx tneural.h
	$(CC) -c tneural.cxx $(CPPFLAGS)


clean:
	rm -f *.o core *~  test  chess3d draw hand textbr
