FFLAGS = -O4
CFLAGS = -xO4

LIBOBJECTS = structure.o loadadcs.o markhits.o
LIBRARY = libdetectors.a

teststruct: teststruct.o $(LIBRARY)
	f77 $(LDFLAGS) -o teststruct teststruct.o $(LIBRARY)

$(LIBRARY): $(LIBOBJECTS)
	-rm -f $@
	ar crv $@ `lorder $(LIBOBJECTS) |tsort`

teststruct.o: teststruct.f
markhits.o: markhits.c
loadadcs.o: loadadcs.c structure.h loadadcs.h
structure.o: structure.c structure.h
