# Makefile for ng-Vkernel C library for the SUN (MC68000)
#
#
DIRS = emt exec io math mem naming numeric others process strings time vgts
SUBDIRS= emt/*.b exec/*.b numeric/*.b strings/*.b emt/*.b math/*.b \
	naming/*.b others/*.b io/*.b mem/*.b \
	process/*.b time/*.b vgts/*.b

libV:
	rm -f libV.a
	domake "$(DIRS)" "make"
	ar cr libV.a `lorder68 $(SUBDIRS) | tsort`

install:
#ifdef X
	netinstall -x "libV.a process/teamroot.b" /usr/sun/xlib
#else X
	netinstall "libV.a process/teamroot.b" /usr/sun/lib
#endif X

install-includes:
#ifdef X
	netinstall -x "include/*.h" /usr/sun/xinclude
#else X
	netinstall "include/*.h" /usr/sun/include
#endif X

clean:
	rm -f  *CKP *BAK *.b .emacs* libV.a
	domake "$(DIRS)" "make clean"

backup:
	cd ..; cpdir libc ../Vbackup/libc

build:
	buildmake.sh
	domake "$(DIRS)" "make build"

xbuild:
	buildmake.sh -DX=1
	domake "$(DIRS)" "make xbuild"
