# NMAKE makefile for Visual C++ 5

###### Tools

CXX  = cl.exe
LINK = link.exe

###### Compiler/linker flags

CXX_FLAGS = /nologo /MTd /W3 /Gm /GX /Zi /Od /DWIN32 /D_DEBUG \
 /D_WINDOWS /YX

INC_PATH = /I..\src

LIB_PATH = /libpath:..\dev

LINK_FLAGS = kernel32.lib wsock32.lib /nologo /subsystem:console \
 /debug /machine:I386 /pdbtype:sept /warn:3

###### Targets

default: exampl01.exe exampl02.exe exampl03.exe exampl04.exe exampl05.exe
default: mimepp_core.dll mimepp_util.dll

exampl01.exe : exampl01.obj basicmsg.obj
  @$(LINK) $(LINK_FLAGS) $(LIB_PATH) exampl01.obj basicmsg.obj \
		mimepp_core.lib /out:exampl01.exe

exampl02.exe : exampl02.obj basicmsg.obj
  @$(LINK) $(LINK_FLAGS) $(LIB_PATH) exampl02.obj basicmsg.obj \
  mimepp_core.lib /out:exampl02.exe

exampl03.exe : exampl03.obj basicmsg.obj multipar.obj
  @$(LINK) $(LINK_FLAGS) $(LIB_PATH) exampl03.obj basicmsg.obj \
  multipar.obj mimepp_core.lib mimepp_util.lib /out:exampl03.exe

exampl04.exe : exampl04.obj basicmsg.obj multipar.obj
  @$(LINK) $(LINK_FLAGS) $(LIB_PATH) exampl04.obj basicmsg.obj \
  multipar.obj mimepp_core.lib mimepp_util.lib /out:exampl04.exe

exampl05.exe : exampl05.obj basicmsg.obj multipar.obj attach.obj
  @$(LINK) $(LINK_FLAGS) $(LIB_PATH) exampl05.obj basicmsg.obj \
  multipar.obj attach.obj mimepp_core.lib mimepp_util.lib /out:exampl05.exe

exampl01.obj : exampl01.cpp
  @$(CXX) $(CXX_FLAGS) /c $(INC_PATH) exampl01.cpp

exampl02.obj : exampl02.cpp
  @$(CXX) $(CXX_FLAGS) /c $(INC_PATH) exampl02.cpp

exampl03.obj : exampl03.cpp
  @$(CXX) $(CXX_FLAGS) /c $(INC_PATH) exampl03.cpp

exampl04.obj : exampl04.cpp
  @$(CXX) $(CXX_FLAGS) /c $(INC_PATH) exampl04.cpp

exampl05.obj : exampl05.cpp
  @$(CXX) $(CXX_FLAGS) /c $(INC_PATH) exampl05.cpp

basicmsg.obj : basicmsg.cpp
  @$(CXX) $(CXX_FLAGS) /c $(INC_PATH) basicmsg.cpp

multipar.obj : multipar.cpp
  @$(CXX) $(CXX_FLAGS) /c $(INC_PATH) multipar.cpp

attach.obj : attach.cpp
  @$(CXX) $(CXX_FLAGS) /c $(INC_PATH) attach.cpp

mimepp_core.dll :
  @copy ..\dev\mimepp_core.dll

mimepp_util.dll :
  @copy ..\dev\mimepp_util.dll

clean:
  del *.dll
  del *.obj
  del *.ilk
  del *.pdb
  del *.exe
  del *.out
  del *.pch
  del *.idb

