3 include $(TOPDIR
)/rules.mk
7 PKG_BUILD_DIR
:=$(BUILD_DIR
)/base-files
9 BOARD
:=$(shell LANG
=C grep ^CONFIG_LINUX_2_._
$(TOPDIR
)/.config|sed
-e
"s/=y//" \
10 -e
"s/.*_//"| tr
"[:upper:]" "[:lower:]")
11 KERNEL
:=$(shell LANG
=C grep ^CONFIG_LINUX_2_._
$(TOPDIR
)/.config|sed
-e
"s/=y//" \
12 -e
"s/CONFIG_LINUX_//" -e
"s/_BRCM//" -e
"s/_/./"| tr
"[:upper:]" "[:lower:]")
14 REV
:=$(shell LANG
=C svn
info | awk
'/^Revision:/ { print$$2 }' )
19 include $(TOPDIR
)/package
/rules.mk
21 define Package
/base-files
25 TITLE
:=OpenWrt system scripts
26 DESCRIPTION
:=OpenWrt system scripts
33 DEFAULT
:=m
, y if GCC_VERSION_4_0_2 || GCC_VERSION_4_0_3 || GCC_VERSION_4_1_0
34 TITLE
:=GCC support library
35 VERSION
:=$(LIBGCC_VERSION
)-$(PKG_RELEASE
)
40 $(call Package
/base-files
)
41 VERSION
:=$(UCLIBC_VERSION
)-$(PKG_RELEASE
)
43 DESCRIPTION
:=C library for embedded systems
48 mkdir
-p
$(PKG_BUILD_DIR
)
54 define Package
/base-files
/install
55 $(CP
) .
/default
/* $(1)
56 $(SED
) 's,$$R,r$(REV),g' $(1)/etc
/banner
57 $(SED
) 's,$$S,$(BOARD)-$(KERNEL),g' $(1)/etc
/ipkg.conf
59 mkdir
-p
$(1)/etc
/crontabs
69 ln
-sf
/tmp
/resolv.conf
$(1)/etc
/resolv.conf
70 ln
-sf
/proc
/mounts
$(1)/etc
/mtab
73 -find
$(1) -type d
-name CVS | xargs
rm -rf
74 -find
$(1) -type d
-name .svn | xargs
rm -rf
75 -find
$(1) -name
'.#*' | xargs
rm -f
79 define Package
/uclibc
/install
81 for file in ld-uClibc libc libcrypt libdl libm libnsl libresolv librt libuClibc libutil
; do \
82 $(CP
) $(STAGING_DIR
)/lib
/$$file.so.
* $(1)/lib
/; \
83 $(CP
) $(STAGING_DIR
)/lib
/$$file-$(UCLIBC_VERSION
).so
$(1)/lib
/; \
87 define Package
/libgcc
/install
88 mkdir
-p
$(IDIR_LIBGCC
)/lib
89 $(CP
) $(STAGING_DIR
)/lib
/libgcc_s.so.
* $(IDIR_LIBGCC
)/lib
/
92 $(eval
$(call BuildPackage
,base-files
))
93 $(eval
$(call BuildPackage
,libgcc
))
94 $(eval
$(call BuildPackage
,uclibc
))