-CFLAGS := $(HOSTCFLAGS) -O2 -I../include
-ifneq ($(OS),Linux)
-CFLAGS += -Dloff_t=off_t -D__BYTE_ORDER=BYTE_ORDER -I$(STAGING_DIR)/include-host -include getline.h
+CFLAGS := $(HOST_CFLAGS) -I../include
+ifneq ($(HOST_OS),Linux)
+CFLAGS += -Dloff_t=off_t -D__BYTE_ORDER=BYTE_ORDER -include getline.h -include endian.h