OS=__$(shell uname)
BUILD=..

include $(BUILD)/make.inc

LIB_INC=-I$(BUILD)/gpklib -I$(BUILD)
CC=$(CCLIB)

.PRECIOUS: $(BUILD)/libgpk.a



OBJS= image.o
HDRS= image.h
HEADERS=${HDRS:%=$(INC)/gpklib/%}
LHDRS=${HDRS:%=$(BUILD)/gpklib/%}


.PHONY: all
all: $(BUILD)/libgpk.a $(LHDRS)

$(BUILD)/libgpk.a: $(BUILD)/libgpk.a( $(OBJS) )

install: $(HEADERS)


$(INC)/gpklib/% : %
	$(INSTALL) $* $(INC)/gpklib/$* -m 0444

$(BUILD)/gpklib/% : %
	$(INSTALL) $* $(BUILD)/gpklib/$* -m 0444

clean:
	rm -f *.o *.a *.so

$(OBJS) : $(LHDRS)
image.o: $(BUILD)/gpklib.h $(BUILD)/gpklib/ieee754.h
image.o: $(BUILD)/gpk_std.h $(BUILD)/gpklib/NaN.h $(BUILD)/gpklib/innerloop4.h
