!include "win32/config.mk"

!include "win32/objects.mk"

CFLAGS=$(CFLAGS)

AR = lib
ARFLAGS = -nologo /LTCG

RESOURCE=$(INTDIR)\libssh2.res
DLL=libssh2$(SUFFIX).dll
STATICLIB=$(INTDIR)\libssh2.lib

!if "$(BUILD_STATIC_LIB)" == ""
all: $(DLL)
!else
all: $(STATICLIB)
!endif

$(DLL): $(OBJECTS) $(RESOURCE)
	$(CC) -o $(DLL) $(DLLFLAGS) $(OBJECTS) $(RESOURCE) $(LIBS)

$(STATICLIB): $(OBJECTS)
	$(AR) $(ARFLAGS) -out:$@ $(OBJECTS)

$(RESOURCE): win32\libssh2.rc
	$(RC) $(RCFLAGS) /Fo"$@" $?

!include "win32/rules.mk"

