RSS Git Download  Clone
Raw Blame History
################################################################################
#	Master Makefile for System Sources
#				T.Barnaby,	BEAM Ltd,	2007-02-21
################################################################################
#
# Normal build is (as root):
#	make rpms
#
srcDir		= ${shell pwd}
kernelVersion	= ${shell uname -r}

include Makefile.config

DESTDIR 	= ${srcDir}/rootfs
DISTDIR 	= /dist/tms
 
all:	rootfsAll

config: 	rootfsConfig

#install:	all rootfsInstall kernelInstall nfsBootInstall nfsBootInstallSys rootfsInstallDev
install:	all rootfsInstall kernelInstall nfsBootInstall nfsBootInstallSys
	make -C scripts install

clean:
	rm -fr rootfs-build/* rootfs-build/.[A-z]* rootfs/*

kernelInstall:
	mkdir -p ${rootDir}/boot
	cp /boot/vmlinuz-${kernelVersion} ${rootDir}/boot
	ln -sf vmlinuz-${kernelVersion} ${rootDir}/boot/vmlinuz
	mkdir -p ${rootDir}/lib/modules/${kernelVersion}
	for l in ${kernelModules}; do cp `find /lib/modules/${kernelVersion} -name $$l` ${rootDir}/lib/modules/${kernelVersion}; done
#	cp -a /lib/modules/${kernelVersion} ${rootDir}/lib/modules
	/sbin/depmod -b ${rootDir} ${kernelVersion}

rpms:	clean tms-mcsys.spec
	tar -czC .. -f ${rpmDir}/SOURCES/tms-mcsys.tar.gz tms-mcsys
	rpmbuild -bb -D "version ${version}" -D "release ${release}" tms-mcsys.spec

rpmsInstall:
	cp ${rpmDir}/RPMS/i386/tms-mcsys-${version}-${release}.i386.rpm ${DISTDIR}/packages
	createrepo ${DISTDIR}

packages:
	yum install busybox-beam

include Makefile.sys