ORIGIN = PWB
ORIGIN_VER = 2.0
PROJ = RANDINT
PROJFILE = RANDINT.MAK
DEBUG = 0

BSCMAKE  = bscmake
SBRPACK  = sbrpack
NMAKEBSC1  = set
NMAKEBSC2  = nmake
CC  = cl
CFLAGS_G  = /W2 /ASw /GD /Zp /BATCH
CFLAGS_D  = /f /Zi /Od /Gs
CFLAGS_R  = /f- /Oe /Og /Os /Gs
CXX  = cl
CXXFLAGS_G  = /W2 /ASw /GD /Zp /BATCH
CXXFLAGS_D  = /f /Zi /Od /Gs
CXXFLAGS_R  = /f- /Oe /Og /Os /Gs
MAPFILE_D  = NUL
MAPFILE_R  = NUL
LFLAGS_G  = /BATCH /ONERROR:NOEXE
LFLAGS_D  = /CO /NOF
LFLAGS_R  = /NOF
LLIBS_G  = LIBW.LIB
LINKER	= link
ILINK  = ilink
LRF  = echo > NUL
ILFLAGS  = /a /e
RC  = rc
IMPLIB	= implib
LLIBS_R  = /NOD:SLIBCE SDLLCEW
LLIBS_D  = /NOD:SLIBCE SDLLCEW

FILES  = RANDINT.C RANDINT.DEF
DEF_FILE  = RANDINT.DEF
OBJS  = RANDINT.obj
SBRS  = RANDINT.sbr

all: $(PROJ).dll

.SUFFIXES:
.SUFFIXES:
.SUFFIXES: .obj .sbr .c

RANDINT.obj : RANDINT.C
!IF $(DEBUG)
	$(CC) /c $(CFLAGS_G) $(CFLAGS_D) /FoRANDINT.obj RANDINT.C
!ELSE
	$(CC) /c $(CFLAGS_G) $(CFLAGS_R) /FoRANDINT.obj RANDINT.C
!ENDIF

RANDINT.sbr : RANDINT.C
!IF $(DEBUG)
	$(CC) /Zs $(CFLAGS_G) $(CFLAGS_D) /FRRANDINT.sbr RANDINT.C
!ELSE
	$(CC) /Zs $(CFLAGS_G) $(CFLAGS_R) /FRRANDINT.sbr RANDINT.C
!ENDIF


$(PROJ).bsc : $(SBRS)
	$(BSCMAKE) @<<
$(BRFLAGS) $(SBRS)
<<

$(PROJ).dll : $(DEF_FILE) $(OBJS)
!IF $(DEBUG)
	$(LRF) @<<$(PROJ).lrf
$(RT_OBJS: = +^
) $(OBJS: = +^
)
$@
$(MAPFILE_D)
$(LIBS: = +^
) +
$(LLIBS_G: = +^
) +
$(LLIBS_D: = +^
)
$(DEF_FILE) $(LFLAGS_G) $(LFLAGS_D);
<<
!ELSE
	$(LRF) @<<$(PROJ).lrf
$(RT_OBJS: = +^
) $(OBJS: = +^
)
$@
$(MAPFILE_R)
$(LIBS: = +^
) +
$(LLIBS_G: = +^
) +
$(LLIBS_R: = +^
)
$(DEF_FILE) $(LFLAGS_G) $(LFLAGS_R);
<<
!ENDIF
	$(LINKER) @$(PROJ).lrf
	$(IMPLIB) $*.lib $@


.c.obj :
!IF $(DEBUG)
	$(CC) /c $(CFLAGS_G) $(CFLAGS_D) /Fo$@ $<
!ELSE
	$(CC) /c $(CFLAGS_G) $(CFLAGS_R) /Fo$@ $<
!ENDIF

.c.sbr :
!IF $(DEBUG)
	$(CC) /Zs $(CFLAGS_G) $(CFLAGS_D) /FR$@ $<
!ELSE
	$(CC) /Zs $(CFLAGS_G) $(CFLAGS_R) /FR$@ $<
!ENDIF


run: $(PROJ).dll
	

debug: $(PROJ).dll
	
