1# Makefile used to compile libpng statically 2# you need to define ZLIB_INCLUDE to the Zlib include path 3# and PREFIX to the installation path 4# 5LIBPNG_LIB := $(SRC_PATH)/libpng.a 6LIBPNG_CFLAGS := -I$(LIBPNG_DIR) 7 8HOST_ARCH := $(shell uname -p) 9HOST_OS := $(shell uname -s) 10ifeq ($(HOST_OS),Darwin) 11 HOST_OS := darwin 12endif 13 14include $(LIBPNG_DIR)/sources.make 15 16LIBPNG_OBJS := $(LIBPNG_SOURCES:%.c=%.o) 17 18$(LIBPNG_LIB): $(LIBPNG_OBJS) 19 ar ru $@ $(LIBPNG_OBJS) 20 21$(LIBPNG_OBJS): CFLAGS += $(ZLIB_CFLAGS) $(LIBPNG_CFLAGS) 22 23clean-libpng: 24 rm -f $(LIBPNG_OBJS) $(LIBPNG_LIB) 25 26