3 include $(TOPDIR
)/rules.mk
7 PKG_BUILD_DIR
:=$(BUILD_DIR
)/base-files
9 include $(TOPDIR
)/package
/rules.mk
11 IDIR_BASE
:=$(PKG_BUILD_DIR
)/base-files
12 IPKG_BASE
:=$(PACKAGE_DIR
)/$(PKG_NAME
)_
$(PKG_RELEASE
)_
$(ARCH
).ipk
14 LIBC_VERSION
:=${shell cat
$(STAGING_DIR
)/uclibc_version
}
15 IDIR_LIBC
:=$(PKG_BUILD_DIR
)/uclibc
16 IPKG_LIBC
:=$(PACKAGE_DIR
)/uclibc_
$(LIBC_VERSION
)-$(PKG_RELEASE
)_
$(ARCH
).ipk
18 GCC_VERSION
:=${shell cat
$(STAGING_DIR
)/gcc_version
}
19 IDIR_GCC
:=$(PKG_BUILD_DIR
)/libgcc
20 IPKG_GCC
:=$(PACKAGE_DIR
)/libgcc_
$(GCC_VERSION
)-$(PKG_RELEASE
)_
$(ARCH
).ipk
22 PACKAGES
:=$(IPKG_BASE
) $(IPKG_LIBC
) $(IPKG_GCC
)
24 $(PKG_BUILD_DIR
)/.prepared
:
25 mkdir
-p
$(PKG_BUILD_DIR
) $(PACKAGE_DIR
)
28 $(PKG_BUILD_DIR
)/.built
:
32 $(SCRIPT_DIR
)/make-ipkg-dir.sh
$(IDIR_BASE
) ipkg
/$(PKG_NAME
).control
$(PKG_RELEASE
) $(ARCH
)
33 cp
-a .
/default
/* $(IDIR_BASE
)
34 mkdir
-p
$(IDIR_BASE
)/jffs
35 mkdir
-p
$(IDIR_BASE
)/dev
36 mkdir
-p
$(IDIR_BASE
)/proc
37 mkdir
-p
$(IDIR_BASE
)/tmp
38 mkdir
-p
$(IDIR_BASE
)/lib
39 mkdir
-p
$(IDIR_BASE
)/usr
/lib
40 mkdir
-p
$(IDIR_BASE
)/usr
/bin
41 ln
-sf
/tmp
/resolv.conf
$(IDIR_BASE
)/etc
/resolv.conf
42 rm -rf
$(IDIR_BASE
)/var
43 ln
-sf
/tmp
$(IDIR_BASE
)/var
44 -find
$(IDIR_BASE
) -type d
-name CVS | xargs
rm -rf
45 -find
$(IDIR_BASE
) -type d
-name .svn | xargs
rm -rf
46 mkdir
-p
$(IDIR_BASE
)/etc
47 -grep \^BR2_SYSCONF
$(TOPDIR
)/.config
> $(IDIR_BASE
)/etc
/sysconf
48 $(IPKG_BUILD
) $(IDIR_BASE
) $(PACKAGE_DIR
)
51 $(SCRIPT_DIR
)/make-ipkg-dir.sh
$(IDIR_LIBC
) ipkg
/uclibc.control
$(LIBC_VERSION
)-$(PKG_RELEASE
) $(ARCH
)
52 mkdir
-p
$(IDIR_LIBC
)/lib
53 cp
-a
$(STAGING_DIR
)/lib
/ld-uClibc
*.so
* $(IDIR_LIBC
)/lib
/
54 for file in c crypt dl m nsl resolv rt uClibc util
; do \
55 cp
-a
$(STAGING_DIR
)/lib
/lib
$$file*.so
* $(IDIR_LIBC
)/lib
/; \
57 -$(STRIP
) $(IDIR_LIBC
)/lib
/*
58 $(IPKG_BUILD
) $(IDIR_LIBC
) $(PACKAGE_DIR
)
61 $(SCRIPT_DIR
)/make-ipkg-dir.sh
$(IDIR_GCC
) ipkg
/libgcc.control
$(GCC_VERSION
)-$(PKG_RELEASE
) $(ARCH
)
62 mkdir
-p
$(IDIR_GCC
)/lib
63 cp
-a
$(STAGING_DIR
)/lib
/libgcc
*.so
* $(IDIR_GCC
)/lib
/
64 -$(STRIP
) $(IDIR_GCC
)/lib
/*
65 $(IPKG_BUILD
) $(IDIR_GCC
) $(PACKAGE_DIR
)
70 mkdir
-p
$(TARGET_DIR
)
71 $(IPKG
) install $(PACKAGES
)