#	Copyright (c) 1984 AT&T
#	  All Rights Reserved

#	THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF AT&T
#	The copyright notice above does not evidence any
#	actual or intended publication of such source code.

#	Copyright (c) 1986 by National Semiconductor Corp.
#	All Rights Reserved


# #ident	"@(#)kern-port:os/os.mk	10.19" #

#ident	"@(#)os.mk	1.14	9/29/86 Copyright (c) 1985 by National Semiconductor Corp."

#
#		Copyright 1984 AT&T
#

ROOT = 
UTS = ../cf
STRIP = strip
INCRT = -I../ -I/usr/src/uts/clipper
LIBNAME = $(UTS)/lib.os
CPU = pm300
OS = /usr/src/uts/clipper/os
IO = /usr/src/uts/clipper/io
HERE = .

DASHG = 
DASHO =
FRC =
MORECPP =
CC = cc
LD = ld
.SUFFIXES:

CFLAGS= $(PFLAGS) -Dopus -D$(CPU) -DKDEBUG -DSVR3 -DWS -DCAMMUX -DCAMMUX1 -DCPUV
PFLAGS= $(DASHG) $(DASHO) $(INCRT) -DINKERNEL $(MORECPP)

DFILES =\
	$(LIBNAME)(bitmasks.o)\
	$(LIBNAME)(clock.o)\
	$(LIBNAME)(cpt.o)\
	$(LIBNAME)(errlog.o)\
	$(LIBNAME)(exec.o)\
	$(LIBNAME)(exit.o)\
	$(LIBNAME)(fault.o)\
	$(LIBNAME)(fork.o)\
	$(LIBNAME)(getpages.o)\
	$(LIBNAME)(grow.o)\
	$(LIBNAME)(inode.o)\
	$(LIBNAME)(lock.o)\
	$(LIBNAME)(machdep.o)\
	$(LIBNAME)(main.o)\
	$(LIBNAME)(malloc.o)\
	$(LIBNAME)(mem.o)\
	$(LIBNAME)(mmgt.o)\
	$(LIBNAME)(move.o)\
	$(LIBNAME)(opus.o)\
	$(LIBNAME)(dos.o)\
	$(LIBNAME)(page.o)\
	$(LIBNAME)(phm.o)\
	$(LIBNAME)(pipe.o)\
	$(LIBNAME)(prf.o)\
	$(LIBNAME)(probe.o)\
	$(LIBNAME)(physio.o)\
	$(LIBNAME)(region.o)\
	$(LIBNAME)(sched.o)\
	$(LIBNAME)(sdt.o)\
	$(LIBNAME)(sig.o)\
	$(LIBNAME)(slp.o)\
	$(LIBNAME)(space.o)\
	$(LIBNAME)(startup.o)\
	$(LIBNAME)(stream.o)\
	$(LIBNAME)(swapalloc.o)\
	$(LIBNAME)(swtch.o)\
	$(LIBNAME)(syms.o)\
	$(LIBNAME)(sys3.o)\
	$(LIBNAME)(sysclipper.o)\
	$(LIBNAME)(sys4.o)\
	$(LIBNAME)(sysent.o)\
	$(LIBNAME)(text.o)\
	$(LIBNAME)(todc.o)\
	$(LIBNAME)(trap.o)\
	$(LIBNAME)(pc.o)\
	$(LIBNAME)(ws.o)\
	$(LIBNAME)(shm.o)\
	$(LIBNAME)(sem.o)\
	$(LIBNAME)(msg.o)\
	$(LIBNAME)(ipc.o)\
	$(LIBNAME)(syscall.o)

#
# Files for avoiding optimization
#
NOPFILES =

.PRECIOUS:	$(LIBNAME)

all:	$(UTS)/disp.o $(UTS)/name.o $(LIBNAME) 

$(LIBNAME):	$(DFILES)
#	$(CC) -c $(CFLAGS) $(?:.o=.c)
	ar rv $(LIBNAME) $?
	-rm -f $?
	-if test -z "$(ROOT)" ; \
	then \
		chown bin $(LIBNAME) ; \
		chgrp bin $(LIBNAME) ; \
		chmod 0664 $(LIBNAME) ; \
	fi

#.c.a:
#	$(CC) -c $(CFLAGS) $<;

$(UTS)/disp.o: $(OS)/disp.c
	$(CC) $(CFLAGS) -c $(OS)/disp.c
	-mv disp.o $(UTS)/

$(UTS)/name.o: $(OS)/name.c 
	$(CC) $(CFLAGS) -c $(OS)/name.c \
		-DREL=`expr '"$(REL)' : '\(..\{0,8\}\)'`\" \
		-DVER=`expr '"$(VER)' : '\(..\{0,8\}\)'`\"
	-mv name.o $(UTS)/

clean:
	-rm -f *.o

clobber:	clean
	-rm -f $(LIBNAME)

$(LIBNAME)(bitmasks.o): $(OS)/bitmasks.c; $(CC) -c $(CFLAGS) $?
$(LIBNAME)(clock.o): $(OS)/clock.c; $(CC) -c $(CFLAGS) $?
$(LIBNAME)(cpt.o): $(IO)/cpt.c; $(CC) -c $(CFLAGS) $?
$(LIBNAME)(errlog.o): $(OS)/errlog.c; $(CC) -c $(CFLAGS) $?
$(LIBNAME)(exec.o): $(OS)/exec.c; $(CC) -c $(CFLAGS) $?
$(LIBNAME)(exit.o): $(OS)/exit.c; $(CC) -c $(CFLAGS) $?
$(LIBNAME)(fault.o): $(OS)/fault.c; $(CC) -c $(CFLAGS) $?
$(LIBNAME)(fork.o): $(OS)/fork.c; $(CC) -c $(CFLAGS) $?
$(LIBNAME)(getpages.o): $(OS)/getpages.c; $(CC) -c $(CFLAGS) $?
$(LIBNAME)(grow.o): $(OS)/grow.c; $(CC) -c $(CFLAGS) $?
$(LIBNAME)(inode.o): $(HERE)/inode.c; $(CC) -c $(CFLAGS) $?
$(LIBNAME)(lock.o): $(OS)/lock.c; $(CC) -c $(CFLAGS) $?
$(LIBNAME)(machdep.o): $(OS)/machdep.c; $(CC) -c $(CFLAGS) $?
$(LIBNAME)(main.o): $(OS)/main.c; $(CC) -c $(CFLAGS) $?
$(LIBNAME)(malloc.o): $(OS)/malloc.c; $(CC) -c $(CFLAGS) $?
$(LIBNAME)(mem.o): $(IO)/mem.c; $(CC) -c $(CFLAGS) $?
$(LIBNAME)(mmgt.o): $(OS)/mmgt.c; $(CC) -c $(CFLAGS) $?
$(LIBNAME)(move.o): $(OS)/move.c; $(CC) -c $(CFLAGS) $?
$(LIBNAME)(opus.o): $(OS)/opus.c; $(CC) -c $(CFLAGS) $?
$(LIBNAME)(dos.o): $(HERE)/dos.c; $(CC) -c $(CFLAGS) $?
$(LIBNAME)(page.o): $(OS)/page.c; $(CC) -c $(CFLAGS) $?
$(LIBNAME)(phm.o): $(OS)/phm.c; $(CC) -c $(CFLAGS) $?
$(LIBNAME)(pipe.o): $(OS)/pipe.c; $(CC) -c $(CFLAGS) $?
$(LIBNAME)(prf.o): $(OS)/prf.c; $(CC) -c $(CFLAGS) $?
$(LIBNAME)(probe.o): $(OS)/probe.c; $(CC) -c $(CFLAGS) $?
$(LIBNAME)(physio.o): $(HERE)/physio.c; $(CC) -c $(CFLAGS) $?
$(LIBNAME)(region.o): $(OS)/region.c; $(CC) -c $(CFLAGS) $?
$(LIBNAME)(sched.o): $(OS)/sched.c; $(CC) -c $(CFLAGS) $?
$(LIBNAME)(sdt.o): $(OS)/sdt.c; $(CC) -c $(CFLAGS) $?
$(LIBNAME)(sig.o): $(OS)/sig.c; $(CC) -c $(CFLAGS) $?
$(LIBNAME)(slp.o): $(OS)/slp.c; $(CC) -c $(CFLAGS) $?
$(LIBNAME)(space.o): $(OS)/space.c; $(CC) -c $(CFLAGS) $?
$(LIBNAME)(startup.o): $(OS)/startup.c; $(CC) -c $(CFLAGS) $?
$(LIBNAME)(stream.o): $(HERE)/stream.c; $(CC) -c $(CFLAGS) $?
$(LIBNAME)(swapalloc.o): $(OS)/swapalloc.c; $(CC) -c $(CFLAGS) $?
$(LIBNAME)(swtch.o): $(OS)/swtch.c; $(CC) -c $(CFLAGS) $?
$(LIBNAME)(syms.o): $(IO)/syms.c; $(CC) -c $(CFLAGS) $?
$(LIBNAME)(sys3.o): $(OS)/sys3.c; $(CC) -c $(CFLAGS) $?
$(LIBNAME)(sysclipper.o): $(OS)/sysclipper.c; $(CC) -c $(CFLAGS) $?
$(LIBNAME)(sys4.o): $(OS)/sys4.c; $(CC) -c $(CFLAGS) $?
$(LIBNAME)(sysent.o): $(HERE)/sysent.c; $(CC) -c $(CFLAGS) $?
$(LIBNAME)(text.o): $(OS)/text.c; $(CC) -c $(CFLAGS) $?
$(LIBNAME)(todc.o): $(OS)/todc.c; $(CC) -c $(CFLAGS) $?
$(LIBNAME)(trap.o): $(OS)/trap.c; $(CC) -c $(CFLAGS) $?
$(LIBNAME)(pc.o): $(HERE)/pc.c; $(CC) -c $(CFLAGS) $?
$(LIBNAME)(ws.o): $(HERE)/ws.c; $(CC) -c $(CFLAGS) $?
$(LIBNAME)(shm.o): $(IO)/shm.c; $(CC) -c $(CFLAGS) $?
$(LIBNAME)(sem.o): $(IO)/sem.c; $(CC) -c $(CFLAGS) $?
$(LIBNAME)(msg.o): $(IO)/msg.c; $(CC) -c $(CFLAGS) $?
$(LIBNAME)(ipc.o): $(IO)/ipc.c; $(CC) -c $(CFLAGS) $?
$(LIBNAME)(syscall.o): $(HERE)/syscall.c; $(CC) -c $(CFLAGS) $?
