!include "win32/config.mk"

!include "Makefile.inc"

OBJECTS=$(CSOURCES:.c=.obj)

# SUBDIRS=src example
SUBDIRS=src

all-sub: win32\objects.mk
	-for %D in ($(SUBDIRS)) do $(MAKE) /nologo /f %D/NMakefile BUILD=$(BUILD) SUBDIR=%D all-sub

clean: 
	-rmdir 2>NUL /s/q $(TARGET)

real-clean vclean: clean
	-del 2>NUL libssh2.dll
	-del 2>NUL libssh2.exp
	-del 2>NUL libssh2.ilk
	-del 2>NUL libssh2.lib
	-del 2>NUL *.pdb
	-del 2>NUL win32\objects.mk

win32\objects.mk: Makefile.inc
	@echo OBJECTS = \>$@
	@for %O in ($(OBJECTS)) do @echo $$(INTDIR)\%O \>>$@
	@echo $$(EOL)>>$@

