
!include "..\Make.inc"

CPPFLAGS = $(CPPGLOBAL) /I .. /D _WINDOWS /D _WINDLL /D _AFXDLL /D _MBCS /D _USRDLL /D NO_PNG_IMAGE_FORMAT /D NO_JPG_IMAGE_FORMAT /D _TC_STATIC /Fp$(OBJDIR)\LDViewThumbs.pch /Yc"stdafx.h" /c

!IF DEFINED(X64)
LFLAGS=$(LFLAGS) /nodefaultlib:atlamd64.lib
!ENDIF

all: $(OBJDIR) $(OBJDIR)\LDViewThumbs.dll

$(OBJDIR)\LDViewThumbs.res:	LDViewThumbs.tlb

LDViewThumbs.tlb:
	midl   /tlb LDViewThumbs.tlb /h LDViewThumbs.h /iid LDViewThumbs_i.c /Oicf LDViewThumbs.idl 

..\Build\TCFoundation\$(CONFIG)_NO_JPG_NO_PNG\TCFoundation.lib:
	cd ..\TCFoundation
	nmake -f Makefile.vc /nologo POSTFIX=_NO_JPG_NO_PNG EXTRACFLAGS="/D NO_PNG_IMAGE_FORMAT /D NO_JPG_IMAGE_FORMAT"
	cd ..\LDViewThumbs

$(OBJDIR)\LDViewThumbs.dll:	$(OBJDIR)\LDViewThumbs.obj $(OBJDIR)\LDViewThumbs.res 
$(OBJDIR)\LDViewThumbs.dll:	$(OBJDIR)\StdAfx.obj $(OBJDIR)\LDViewThumbExtractor.obj
$(OBJDIR)\LDViewThumbs.dll:	..\Build\TCFoundation\$(CONFIG)_NO_JPG_NO_PNG\TCFoundation.lib
	link gdi32.lib TCFoundation.lib /nologo /subsystem:windows /dll \
	$(LFLAGS) /pdb:none /def:LDViewThumbs.def /out:$(OBJDIR)\LDViewThumbs.dll \
	/implib:$(OBJDIR)\LDViewThumbs.lib /libpath:..\Build\TCFoundation\$(CONFIG)_NO_JPG_NO_PNG $**

lclean:
	del LDViewThumbs.h
	del LDViewThumbs.tlb
	del LDViewThumbs_i.c
	del LDViewThumbs_p.c
	del dlldata.c
	cd ..\TCFoundation
	nmake -f Makefile.vc /nologo POSTFIX=_NO_JPG_NO_PNG clean
	cd ..\LDViewThumbs

clean: lclean

