#-------------------------------------------------------------------------
# Make file to create a library, using Microsoft NMake
# To build your own libraries, just change NAME, and replace your stuff
# at end of file, starting from "And finally, perform real job now......."
#-------------------------------------------------------------------------

######### LARGE VERSION ############

# Library name
NAME=COM

!IFDEF co
!UNDEF co				# convert lower to upper case
CO=
!ENDIF

!IFDEF CO
CDBFLAGS=/Zr /Gf /Z7 /Od
ADBFLAGS=/Zi
!ELSE
CDBFLAGS=/Gs /WX /Gf /Ox /Ob1
ADBFLAGS=
!ENDIF



# large memory model
AMODEL=LMODEL
MODEL=L

#
CFLAGS=-A$(MODEL) /W3 /G2 /Gx- $(CDBFLAGS)
AFLAGS=/Ml /D$(AMODEL) $(ADBFLAGS)

# Library name
LIBNAME=$(MODEL)$(NAME).lib

##############################################################################
##
##	Use file extensions other than .obj when making libraries.
##	The following rules compile and assemble files into:
##		.so		small model
##		.mo		medium model
##		.lo		large model
##
##############################################################################

.c.$(MODEL)o:
        $(CC) $(CFLAGS) /c /Fo$*.$(MODEL)o $*.c
#	lib $(LIBNAME) -+ $(?B).$(MODEL)o;

.asm.$(MODEL)o:
        MASM $(AFLAGS) $*,$*.$(MODEL)o;
#	lib $(LIBNAME) -+ $(?B).$(MODEL)o;

##############################################################################
#
# And finally, perform real job now.......
#
##############################################################################
$(LIBNAME): com.$(MODEL)o \
	    version.$(MODEL)o \
	    comirq.$(MODEL)o
#    del $(LIBNAME)
    lib $(LIBNAME) +$(**);

#
# Dependencies
#
comirq.$(MODEL)o:

com.$(MODEL)o:	com.h version.h

version.$(MODEL)o: version.h
