#
# the makefile for the Signals library
# win32 specific 
#
# NOTE: currently, the signal functions in mach-dep/win32-signal.c are 
#       dummy stubs

SHELL =

INC_DIR =	..\..\include
CLIB_DIR =	..\

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

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

LIBRARY =	libsmlnj-sig.lib

VERSION =	v-dummy

OBJS =		smlnj-sig-lib.obj \
		getsigmask.obj \
		getsigstate.obj \
		listsignals.obj \
		pause.obj \
		setsigmask.obj \
		setsigstate.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 = 	$(INC_DIR)\ml-unixdep.h $(INC_DIR)\ml-base.h \
	$(INC_DIR)\ml-values.h \
	$(INC_DIR)\ml-state.h $(INC_DIR)\ml-signals.h \
	$(CLIB_DIR)\ml-c.h cfun-proto-list.h cfun-list.h

smlnj-sig-lib.obj: smlnj-sig-lib.c $(DEPENDENTS)
	$(CC) $(CFLAGS) $(DEFS) $(INCLUDES) /c smlnj-sig-lib.c

getsigmask.obj: getsigmask.c $(DEPENDENTS)
	$(CC) $(CFLAGS) $(DEFS) $(INCLUDES) /c getsigmask.c

getsigstate.obj: getsigstate.c $(DEPENDENTS)
	$(CC) $(CFLAGS) $(DEFS) $(INCLUDES) /c getsigstate.c

listsignals.obj: listsignals.c $(DEPENDENTS)
	$(CC) $(CFLAGS) $(DEFS) $(INCLUDES) /c listsignals.c

pause.obj: pause.c $(DEPENDENTS)
	$(CC) $(CFLAGS) $(DEFS) $(INCLUDES) /c pause.c

setsigmask.obj: setsigmask.c $(DEPENDENTS)
	$(CC) $(CFLAGS) $(DEFS) $(INCLUDES) /c setsigmask.c

setsigstate.obj: setsigstate.c $(DEPENDENTS)
	$(CC) $(CFLAGS) $(DEFS) $(INCLUDES) /c setsigstate.c

clean :
	del /F /Q v-* *.obj *.pdb $(LIBRARY)

