Makefile 1.51 KB
include devdefs

SUBDIRS = host_lib tools

default all:
	$(SUBDIRS_MAKERULE)

install_root:
	test "" != "$(ROOT)"
	rpm -Uhv --replacepkgs --force binutils-mips-linux-2.9.5-3.i386.rpm
	rpm -Uhv --replacepkgs --force egcs-mips-linux-1.1.2-4.i386.rpm
	rpm -Uhv --replacepkgs --force openssl-0.9.6b-29.i386.rpm
	#rpm -Uhv --replacepkgs --force libelf-0.7.0-1.i386.rpm
	rpm -Uhv --replacepkgs --force libelf-0.8.2-2.i386.rpm
	rpm -Uhv --replacepkgs --force libelf-devel-0.8.2-2.i386.rpm
#	hack for alternate assembler
	cp as /usr/mips-linux/bin
	cp as /usr/bin/mips-linux-as
#	compile and install kernel loadable modules
	make -C modules install

install install_regular:
	test "" != "$(ROOT)"
	mkdir -p $(ROOT)/usr/host_data
	mkdir -p $(ROOT)/usr/include
	mkdir -p $(ROOT)/usr/lib
	mkdir -p $(ROOT)/usr/sbin
	mkdir -p $(ROOT)/host_include
	mkdir -p $(ROOT)/host_lib
	tar cf - --exclude=CVS include | (cd $(ROOT)/usr; tar xf -)
	tar cf - --exclude=CVS host_include | (cd $(ROOT); tar xf -)
	cp -f irix-install $(ROOT)/usr/sbin/irix-install
	$(SUBDIRS_MAKERULE)
#	hack for alternate cpp
	rm -f $(ROOT)/usr/sbin/cpp
	cp cpp $(ROOT)/usr/sbin/cpp
#	hack for gcc runtime routines
	rm -f $(ROOT)/usr/lib/libgcc.a
	cp libgcc.a $(ROOT)/usr/lib/libgcc.a

install_devkit:	install
	test "" != "$(DEVKIT)"
	cp binutils-mips-linux-2.9.5-3.i386.rpm $(DEVKIT)
	cp egcs-mips-linux-1.1.2-4.i386.rpm $(DEVKIT)
	cp libelf-0.8.2-2.i386.rpm $(DEVKIT)
	cp libelf-devel-0.8.2-2.i386.rpm $(DEVKIT)
	cp as $(DEVKIT)
	chmod 755 $(DEVKIT)/as
	make -C modules install_devkit