3 include $(TOPDIR
)/rules.mk
8 PKG_MD5SUM
:= e5a39003eed16103cbbd3b6a8bc6b1f9
10 PKG_SOURCE_SITE
:= @SF
/libpng
11 PKG_SOURCE_FILE
:= $(PKG_NAME
)-$(PKG_VERSION
)-config.
tar.gz
12 PKG_SOURCE_DIR
:= $(PKG_NAME
)-$(PKG_VERSION
)-config
13 PKG_BUILD_DIR
:= $(BUILD_DIR
)/$(PKG_SOURCE_DIR
)
14 PKG_IPK
:= $(PACKAGE_DIR
)/$(PKG_NAME
)_
$(PKG_VERSION
)-$(PKG_RELEASE
)_
$(ARCH
).ipk
16 PKG_IPK_DIR
:= $(PKG_BUILD_DIR
)/ipkg
18 $(DL_DIR
)/$(PKG_SOURCE_FILE
):
19 $(SCRIPT_DIR
)/download.pl
$(DL_DIR
) $(PKG_SOURCE_FILE
) $(PKG_MD5SUM
) $(PKG_SOURCE_SITE
)
21 $(PKG_BUILD_DIR
)/.prepared
: $(DL_DIR
)/$(PKG_SOURCE_FILE
)
22 $(PKG_CAT
) $(DL_DIR
)/$(PKG_SOURCE_FILE
) |
tar -C
$(BUILD_DIR
) $(TAR_OPTIONS
) -
23 $(PATCH
) $(PKG_BUILD_DIR
) .
/patches
24 touch
$(PKG_BUILD_DIR
)/.prepared
26 $(PKG_BUILD_DIR
)/.configured
: $(PKG_BUILD_DIR
)/.prepared
27 (cd
$(PKG_BUILD_DIR
); \
28 $(TARGET_CONFIGURE_OPTS
) \
29 CFLAGS
="$(TARGET_CFLAGS) -I$(STAGING_DIR)/usr/include" \
30 LDFLAGS
="-L$(STAGING_DIR)/usr/lib" \
32 --target
=$(GNU_TARGET_NAME
) \
33 --host
=$(GNU_TARGET_NAME
) \
34 --build
=$(GNU_HOST_NAME
) \
35 --prefix=$(STAGING_DIR
)/usr \
36 --with-zlib
=$(STAGING_DIR
)/usr
/ \
39 touch
$(PKG_BUILD_DIR
)/.configured
41 $(PKG_BUILD_DIR
)/.libs
/libpng.so
: $(PKG_BUILD_DIR
)/.configured
42 $(MAKE
) -C
$(PKG_BUILD_DIR
) \
44 CFLAGS
="$(TARGET_CFLAGS) -I$(STAGING_DIR)/usr/include -L$(STAGING_DIR)/usr/lib" \
47 $(STAGING_DIR
)/usr
/lib
/libpng.so
: $(PKG_BUILD_DIR
)/.libs
/libpng.so
48 $(MAKE
) -C
$(PKG_BUILD_DIR
) \
50 # DESTDIR="$(STAGING_DIR)" \
51 # install-libLTLIBRARIES install-includeHEADERS install-binSCRIPTS
53 $(PKG_IPK
): $(PKG_BUILD_DIR
)/.libs
/libpng.so
54 $(SCRIPT_DIR
)/make-ipkg-dir.sh
$(PKG_IPK_DIR
) $(PKG_NAME
).control
$(PKG_VERSION
)-$(PKG_RELEASE
) $(ARCH
)
55 mkdir
-p
$(PKG_IPK_DIR
)/usr
/lib
56 cp
-a
$(PKG_BUILD_DIR
)/.libs
/*.so
* $(PKG_IPK_DIR
)/usr
/lib
/
57 $(STRIP
) $(PKG_IPK_DIR
)/usr
/lib
/*
58 find
$(PKG_IPK_DIR
) -name CVS | xargs
rm -rf
59 mkdir
-p
$(PACKAGE_DIR
)
60 $(IPKG_BUILD
) $(PKG_IPK_DIR
) $(PACKAGE_DIR
)
62 $(IPKG_STATE_DIR
)/info/libpng.list
: $(PKG_IPK
)
63 $(IPKG
) install $(PKG_IPK
)
65 source
: $(DL_DIR
)/$(PKG_SOURCE
)
66 prepare
: $(PKG_BUILD_DIR
)/.prepared
67 compile
: $(STAGING_DIR
)/usr
/lib
/libpng.so
$(PKG_IPK
)
68 install: $(IPKG_STATE_DIR
)/info/libpng.list
71 rm -rf
$(PKG_BUILD_DIR
)
72 rm -f
$(STAGING_DIR
)/usr
/bin
/libpng
*
73 rm -f
$(STAGING_DIR
)/usr
/lib
/libpng
*