#
# the makefile for the Win32 IO library
#

SHELL =

INC_DIR =	..\..\include
CLIB_DIR =	..\.
MACH_DIR =      ..\..\mach-dep

INCLUDES =	/I$(INC_DIR) /I$(CLIB_DIR) /I..\..\objs

MAKEFILE = 	makefile.win32
MAKE =		nmake /F$(MAKEFILE)
AR =		lib
ARFLAGS =	
RANLIB =	lib

LIBRARY =	libwin32-io.lib

VERSION =	v-dummy

OBJS =		win32-io-lib.obj \
		win32-io.obj \
                poll.obj

$(LIBRARY)	: $(VERSION) $(OBJS)
	del /F /Q $(LIBRARY)
	$(AR) $(ARFLAGS) /out:$(LIBRARY) $(OBJS)
	$(RANLIB) /out:$(LIBRARY)

$(VERSION) :
	($(MAKE) MAKE="$(MAKE)" clean)
	echo "$(VERSION)" > $(VERSION)

DEPENDENTS = $(CLIB_DIR)\ml-c.h cfun-proto-list.h cfun-list.h $(INC_DIR)\c-library.h

win32-io-lib.obj: win32-io-lib.c $(DEPENDENTS)
	$(CC) $(CFLAGS) $(DEFS) $(INCLUDES) /c win32-io-lib.c

win32-io.obj: win32-io.c $(MACH_DIR)\win32-fault.h $(DEPENDENTS) \
	 $(INC_DIR)\ml-base.h $(INC_DIR)\ml-values.h $(INC_DIR)\ml-objects.h
	$(CC) $(CFLAGS) $(DEFS) $(INCLUDES) /c win32-io.c

poll.obj: poll.c $(MACH_DIR)\win32-fault.h $(DEPENDENTS) \
	 $(INC_DIR)\ml-base.h $(INC_DIR)\ml-values.h $(INC_DIR)\ml-objects.h
	$(CC) $(CFLAGS) $(DEFS) $(INCLUDES) /c poll.c
clean:
	del /F /Q v-* *.obj *.pdb $(LIBRARY)


