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