OS=__$(shell uname)

include ../make.inc

MYLIB=../mylib.a
.PRECIOUS: $(MYLIB)

.SUFFIXES:
.SUFFIXES: .o .c .cc .C
.c.o	: ; $(CC) -c $*.c


OBJS=hop.o read.o write.o readfloat.o writefloat.o delete.o
HEADERS=$(INC)/gpklib/readwrite.h

.PHONY: all
all: $(MYLIB) $(HEADERS)

$(MYLIB)     : $(OBJS)
	$(AR) ruv $(MYLIB) $?

$(INC)/gpklib/readwrite.h : readwrite.h
	../install-sh -c readwrite.h $(INC)/gpklib

.cc.o	:
	$(CC) $*.cc

.c.o	:
	$(CC) $*.c

testorder : testorder.c
	CC $(CFLAGS) $(INCLUDES) -o testorder testorder.c

test2rw: test2rw.c $(MYLIB) $(INC)/gpklib/readwrite.h
	CC $(CFLAGS) $(INCLUDES) -o test2rw test2rw.c $(MYLIB)

$(OBJS) : $(HEADERS)
