include <ntwin32.mak>

opengllibs = opengl32.lib glu32.lib glaux.lib

MAKE = nmake

#
# The XXX_DIR variables below MUST have ABSOLUTE path. Since this file
# is sourced from several directories relative path specification will
# be simple wrong.
#
SRC_DIR = d:\c\irit

#
# All libraries created will be installed into the LIB_DIR directory.
#
LIB_DIR = $(SRC_DIR)\lib

#
# All includes files associated with the installed libraries will be
# installed into the INC_DIR directory.
#
INC_DIR = $(SRC_DIR)\include

#
# All binaries created will be installed into the BIN_DIR directory.
#
BIN_DIR = $(SRC_DIR)\ntbin

#
# The scan converter (irender) needs the Utah Raster Toolkit (URT) library
# to read/write image data. You can ftp it in cs.utah.edu.
#
#   Make these empty if you would like to give up on irender's compilation.
#
# URT = d:\c\urt
# URT_INC = -I$(URT)\include
# URT_LIB = $(URT)\lib\rle.lib
# URT_FLAGS = -DHAVE_URT_RLE

#############################################################################
# Flags for Mircosoft C compiler, Windows NT release 3.1, August 1993.
#
IRITCC = cl
DFLAGS = -D__WINNT__ -D_X86_=1 -DWIN32 -D_MT -DRAND -W3 -nologo
IRITLIB = $(implib)
IRITCONLINK = $(link) /dll

# **** NON DEBUG ****
# CFLAGS = -G5 $(DFLAGS) $(URT_INC)
# IRITCONLINK = $(link) $(conflags)
# IRITGUILINK = $(link) $(guiflags)

# **** DEBUG ****
CFLAGS = -Zi -Od $(DFLAGS) $(URT_INC)
IRITCONLINK = $(link) $(conflags) $(linkdebug)
IRITGUILINK = $(link) $(guiflags) $(linkdebug)


#############################################################################
# IRIT Libraries to use:
#
# For using regular libraries.
#
CIRCLINK = $(SRC_DIR)/circlink/circlink.obj
LIBS = $(CIRCLINK) $(USER_LIB) $(BOOL_LIB) $(GEOM_LIB) $(PRSR_LIB) \
	$(TRIM_LIB) $(TRIV_LIB) $(TRNG_LIB) $(SYMB_LIB) $(CAGD_LIB) \
	$(MISC_LIB) $(XTRA_LIB) $(URT_LIB)
DO_IRIT_LIB = circlink_dir

#
# For using Dynamicaly Linked Library
#
# LIBS = $(LIB_DIR)\iritlib.lib $(URT_LIB)
# DO_IRIT_LIB = iritlib.dll

#############################################################################
# Display devices to support
#
GRAPDRVS = nuldrvs.exe wntdrvs.exe wntgdrvs.exe 

#
# Default rule for compilation.
#
.c.obj:
	$(IRITCC) $(URT_FLAGS) $(MORE_FLAGS) $(CFLAGS) -I. -I$(INC_DIR) -c $<


PRSR_LIB = $(LIB_DIR)\prsr_lib.lib
USER_LIB = $(LIB_DIR)\user_lib.lib
GEOM_LIB = $(LIB_DIR)\geom_lib.lib
CAGD_LIB = $(LIB_DIR)\cagd_lib.lib
SYMB_LIB = $(LIB_DIR)\symb_lib.lib
TRIM_LIB = $(LIB_DIR)\trim_lib.lib
TRIV_LIB = $(LIB_DIR)\triv_lib.lib
TRNG_LIB = $(LIB_DIR)\trng_lib.lib
MISC_LIB = $(LIB_DIR)\misc_lib.lib
XTRA_LIB = $(LIB_DIR)\xtra_lib.lib
BOOL_LIB = $(LIB_DIR)\bool_lib.lib

W32CONLIBS = wsock32.lib $(conlibs)
W32GUILIBS = wsock32.lib $(guilibs)
W32GUIMTLIBS = wsock32.lib $(guilibsmt)
W32GUIOGLLIBS = wsock32.lib $(opengllibs) $(guilibsmt)
