.SUFFIXES: .java .class .so
LD=/usr/ccs/bin/ld

JAVA=java
JAVAC=javac

# WGG - I can't find these directories on new-gremlin, so it looks like I need
#  to use these for now.
CFLAGS=-G -I/net/arnold/disk5/psphilli/java/include -I/net/arnold/disk5/psphilli/java/include/solaris

info:
	@echo "\"make all\" compiles the timer library code"
	@echo "\"make test\" tests the timer code"

all: libtimer.so

# WGG - I don't know how the stubs are made.
libtimer.so: Timer.o TimerImp.o
	$(LD) -dy -G -o libtimer.so Timer.o TimerImp.o
#	mv libtimer.so ../lib

test: Main.java Bench.java libtimer.so
	$(JAVA) Main
	$(JAVA) Bench

# WGG - I could probably "clean" the stubs out, but I don't know how they
#  are constructed yet.
clean:
	rm *.o

.java.class:
	$(JAVAC) $?
