# Copyright 2011, Your File System Inc
# All rights reserved
#
# This software has been released under the terms of the BSD License
# For details, see the LICENSE file in the top level source directory

RELDIR=opr
!include ..\config\NTMakefile.$(SYS_NAME)
!include ..\config\NTMakefile.version

INCFILEDIR = $(DESTDIR)\include\afs

INCFILES = \
	$(INCFILEDIR)\opr.h \
	$(INCFILEDIR)\opr_assert.h \
	$(DESTDIR)\include\opr\dict.h \
	$(DESTDIR)\include\opr\ffs.h \
	$(DESTDIR)\include\opr\fmt.h \
	$(DESTDIR)\include\opr\jhash.h \
	$(DESTDIR)\include\opr\proc.h \
	$(DESTDIR)\include\opr\queue.h \
	$(DESTDIR)\include\opr\rbtree.h \
	$(DESTDIR)\include\opr\time.h \
	$(DESTDIR)\include\opr\lock.h \
	$(DESTDIR)\include\opr\lockstub.h \
	$(DESTDIR)\include\opr\softsig.h \
	$(DESTDIR)\include\opr\uuid.h

$(DESTDIR)\include\opr\time.h: opr_time.h
        $(COPY) $** $@

$(DESTDIR)\include\opr\lock.h: opr_lock.h
        $(COPY) $** $@

LIBFILE = $(DESTDIR)\lib\opr.lib

LIBOBJS = \
	$(OUT)\assert.obj \
	$(OUT)\casestrcpy.obj \
	$(OUT)\dict.obj \
	$(OUT)\fmt.obj \
	$(OUT)\proc.obj \
	$(OUT)\rbtree.obj \
	$(OUT)\uuid.obj \
	$(OUT)\AFS_component_version_number.obj

$(LIBOBJS): $(INCFILES)

!if !defined(NMAKE)
NTMAKE = nmake /nologo /f ntmakefile
!endif

$(LIBFILE): $(LIBOBJS)
	$(LIBARCH)

install_headers: $(INCFILES)

install: install_headers $(LIBFILE)

clean::
	$(DEL) $(INCFILES)
	$(DEL) $(LIBFILE)
