all:

buildshared:
	(cd src; make -f Makefile.shared;cd ../)
	(cd src; make -f Makefile.shared clean ;cd ../)
	./makeshared

buildstatic:
	(cd src; make -f Makefile;cd ../)
	@cp lib/libgrx.a libs

clean:
	@rm -f jump/jump.params jump/jump.undefs jump/jump.log jump/*.s
	@rm -f lib/libgrx.a
	@rm -f src/*.o src/linux/*.o src/stamp.gcc


realclean:
	@rm -f *.s jump/jump.params jump/jump.undefs jump/jump.log
	@rm -f lib/libgrx.a libs/*
	(cd src/linux; make clean; cd ../../)
	(cd src; make clean; cd ../)
	(cd test; make clean; cd ../)

installshared:
	@sync
	@echo Installing Grx libraries into /usr/local/lib
	@-cp -f libs/libgrx.sa /usr/local/lib
	@sync
	@echo Installing Shared libraries into /lib
	@-rm -f /lib/libgrx.*
	@-cp libs/libgrx.so.1.0.1 /lib
	@-ln -s /lib/libgrx.so.1.0.1 /lib/libgrx.so.1 
	@sync

installstatic:
	@sync
	@echo Installing static Grx libraries into /usr/local/lib
	@-cp -f libs/libgrx.a /usr/local/lib
	@sync

installheaders:
	@echo Installing Grx includes into /usr/local/include/Grx
	@-rm -rf /usr/local/include/Grx
	@-cp -rf include /usr/local/include/Grx
	@sync

installfonts:
	@echo Install Fonts into /usr/local/lib/fonts
	@rm -rf /usr/local/lib/fonts
	@cp -rf fonts /usr/local/lib/fonts
	@sync

installall:
	@echo Installing Grx includes into /usr/local/include/Grx
	@-rm -rf /usr/local/include/Grx
	@-cp -rf include /usr/local/include/Grx
	@sync
	@echo Install Fonts into /usr/local/lib/fonts
	@rm -rf /usr/local/lib/fonts
	@cp -rf fonts /usr/local/lib/fonts
	@sync
	@echo Installing Grx static libraries into /usr/local/lib
	@-cp -f libs/libgrx.sa /usr/local/lib
	@sync
	@echo Installing Grx shared libraries into /usr/local/lib
	@-cp -f libs/libgrx.sa /usr/local/lib
	@sync
	@echo Installing Shared libraries into /lib
	@-rm -f /lib/libgrx.so.*
	@-cp libs/libgrx.so.1.0.1 /lib
	@-ln -s /lib/libgrx.so.1.0.1 /lib/libgrx.so.1 
	@sync
	@echo Installation Complete!

	

