##
# Makefile automatically generated by genmake 1.0, May-03-00
# genmake 1.0 by muquit@muquit.com, http://www.muquit.com/
# updated for MS Visutal Studio 10 Feb-27-2012 
##
PROGNAME= mailsend.exe
LINKER=link -nologo

OPENSSL_DIR=c:/openssl
OPENSSL_INC=-I$(OPENSSL_DIR)/include
OPENSSL_LIBS=$(OPENSSL_DIR)/lib/libeay32.lib $(OPENSSL_DIR)/lib/ssleay32.lib


MUTILS_INCLUDE= -I./libs/libmutils
MSOCK_INCLUDE= -I./libs/libmsock
SLL_INCLUDE= -I./libs/libsll
INCLUDES=  -I. $(MUTILS_INCLUDE) $(MSOCK_INCLUDE) $(SLL_INCLUDE) $(OPENSSL_INC)

MUTILS_LIB= ./libs/libmutils/mutils.lib
MSOCK_LIB=./libs/libmsock/msock.lib
SLL_LIB= ./libs/libsll/sll.lib

# don't define -DSYS_WIN32.. win2k complains
DEFINES= $(INCLUDES) $(DEFS) -DWINNT=1 -DHAVE_STRING_H=1 -DHAVE_STDLIB_H=1 -DHAVE_MATH_H=1 -DHAVE_OPENSSL=1 -DHAVE_GETADDRINFO=1
CFLAGS= $(DEFINES) /Ox /W3 /wd4996 /nologo
WINDOWS_LIBS=ws2_32.lib shell32.lib advapi32.lib user32.lib gdi32.lib winmm.lib comdlg32.lib comctl32.lib
LIBS=$(MSOCK_LIB) $(SLL_LIB) $(MUTILS_LIB) $(OPENSSL_LIBS) $(WINDOWS_LIBS)

SRCS = main.c smtp.c utils.c setget.c examples.c
OBJS = main.obj smtp.obj utils.obj setget.obj examples.obj

all: $(PROGNAME)

$(PROGNAME) : LIBRARIES $(OBJS)
	$(CC) $(CFLAGS) $(LIBS) $(OBJS) /Fe$(PROGNAME)

LIBRARIES:
	cd libs\libsll
	nmake -f Makefile.nmake
	cd ..\..
	cd libs\libmsock
	nmake -f Makefile.nmake
	cd ..\..
	cd libs\libmutils
	nmake -f Makefile.nmake
	cd ..\..

clean:
	del $(OBJS) $(PROGNAME)
	cd libs\libsll
	nmake -f Makefile.nmake clean
	cd ..\..
	cd libs\libmsock
	nmake -f Makefile.nmake clean
	cd ..\..
	cd libs\libmutils
	nmake -f Makefile.nmake clean
	cd ..\..
