#
# $Id: //devel/tools/main/rfc868time/nmakefile#2 $
#
# written by :	Stephen J. Friedl
#		Software Consultant
#		steve@unixwiz.net
#
#	This is the Microsoft NMAKE file for the RFC868 time service; it's
#	pretty stripped down compared to the real GNU makefile.

CDEFS = -DWIN32_LEAN_AND_MEAN -DUNICODE -D_UNICODE

# /Gz = __stdcall
# /GS - enable stack overflow detection
# /W4 = more errors
# /WX = warnings are treated as errors
# /MT = Link with LIBCMT.LIB

CFLAGS  = /Gz /GS /WX /W3 /MT $(CDEFS)

# Linker options:
#
# /SafeSEH - Exception Handling Protection
# /NXCOMPAT enables Data Execution Prevention
# /DYNAMICBASE enables ASLR (Address Space Layout Randomization)

LFLAGS = /SafeSEH /NXCOMPAT /DYNAMICBASE

# FAIL
#  CFLAGS  = /Gz /GS /WX /W3 /MT $(CDEFS)
#  LFLAGS = /SafeSEH /NXCOMPAT /DYNAMICBASE

CC=cl -nologo
CPP=cl -nologo

ALL = rfc868time.exe

CLEAN	= *.obj *.pch
CLOBBER = $(ALL)

all : $(ALL)

RFC868TIME = rfc868time.obj service.obj odprintf.obj

rfc868time.exe : $(RFC868TIME)
	link /nologo /out:$@ $(LFLAGS) $(RFC868TIME) advapi32.lib Ws2_32.lib kernel32.lib

.cpp.obj:
	$(CPP) -c $(CFLAGS) $<

clean :
	-del $(CLEAN)

clobber : clean
	-del $(CLOBBER)

