#
# Makefile for nmake and VC8
#

CC		= cl
MT		= mt
CP		= copy

CFLAGS_DEF	= /DSTRICT /D_WIN32_WINNT=0x0501 /DWIN32 /DNDEBUG /D_CONSOLE /D_WINDOWS /D_UNICODE /DUNICODE /D_CRT_SECURE_NO_WARNINGS
CFLAGS		= /nologo /O2 /GA /EHsc /MD /W3 /Wp64 $(CFLAGS_DEF)
LIBS		= kernel32.lib user32.lib advapi32.lib
MTFLAGS		= /nologo

SOURCES		= sha1sum.cpp
TARGET		= md5sumu.exe
TARGET2		= sha1sumu.exe

all: release

release:
	IF EXIST $(TARGET) DEL $(TARGET)
	$(CC) $(CFLAGS) $(SOURCES) /DHASH_MD5  $(LIBS) /link /out:$(TARGET)
	$(MT) $(MTFLAGS) -manifest "$(TARGET).manifest" /outputresource:"$(TARGET);#1"
	IF EXIST $(TARGET2) DEL $(TARGET2)
	$(CC) $(CFLAGS) $(SOURCES) /DHASH_SHA1 $(LIBS) /link /out:$(TARGET2)
	$(MT) $(MTFLAGS) -manifest "$(TARGET2).manifest" /outputresource:"$(TARGET2);#1"
	DEL *.obj
	DEL *.exe.manifest
