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
) \
39 --libexecdir
=/usr
/lib \
40 --datadir=/usr
/share \
41 --infodir=/usr
/share
/info \
42 --mandir=/usr
/share
/man \
43 --localstatedir
=/var \
45 --with-zlib
=$(STAGING_DIR
)/usr
/ \
48 touch
$(PKG_BUILD_DIR
)/.configured
50 $(PKG_BUILD_DIR
)/.libs
/libpng.so
: $(PKG_BUILD_DIR
)/.configured
51 $(MAKE
) -C
$(PKG_BUILD_DIR
) \
53 CFLAGS
="$(TARGET_CFLAGS) -I$(STAGING_DIR)/usr/include -L$(STAGING_DIR)/usr/lib" \
56 $(STAGING_DIR
)/usr
/lib
/libpng.so
: $(PKG_BUILD_DIR
)/.libs
/libpng.so
57 $(MAKE
) -C
$(PKG_BUILD_DIR
) \
58 DESTDIR
="$(STAGING_DIR)" \
59 install-libLTLIBRARIES install-includeHEADERS install-binSCRIPTS
61 $(PKG_IPK
): $(PKG_BUILD_DIR
)/.libs
/libpng.so
62 $(SCRIPT_DIR
)/make-ipkg-dir.sh
$(PKG_IPK_DIR
) $(PKG_NAME
).control
$(PKG_VERSION
)-$(PKG_RELEASE
) $(ARCH
)
63 mkdir
-p
$(PKG_IPK_DIR
)/usr
/lib
64 cp
-a
$(PKG_BUILD_DIR
)/.libs
/*.so
* $(PKG_IPK_DIR
)/usr
/lib
/
65 $(STRIP
) $(PKG_IPK_DIR
)/usr
/lib
/*
66 find
$(PKG_IPK_DIR
) -name CVS | xargs
rm -rf
67 mkdir
-p
$(PACKAGE_DIR
)
68 $(IPKG_BUILD
) $(PKG_IPK_DIR
) $(PACKAGE_DIR
)
70 $(IPKG_STATE_DIR
)/info/libpng.list
: $(PKG_IPK
)
71 $(IPKG
) install $(PKG_IPK
)
73 source
: $(DL_DIR
)/$(PKG_SOURCE
)
74 prepare
: $(PKG_BUILD_DIR
)/.prepared
75 compile
: $(STAGING_DIR
)/usr
/lib
/libpng.so
$(PKG_IPK
)
76 install: $(IPKG_STATE_DIR
)/info/libpng.list
79 rm -rf
$(PKG_BUILD_DIR
)
80 rm -f
$(STAGING_DIR
)/usr
/bin
/libpng
*
81 rm -f
$(STAGING_DIR
)/usr
/lib
/libpng
*