#/*
# * Bernoulli Compiler
# * Copyright (c) Cornell University
# * Department of Computer Science
# * 
# * Kamen Yotov (kamen@yotov.org)
# * 
# * $Source: C:/CVS/kyotov/kyotov/Research/BC/Core/makefile,v $
# * $Revision: 1.3 $
# * $Date: 2002/10/23 06:06:43 $
# */

NAME = Core

!INCLUDE "..\makefile.mak"

!IF EXIST(sources.lst)
SOURCES = \
!INCLUDE "sources.lst"

!ENDIF

build: 
	dir *.cs /s /b | $(FILTER) ".*" "  {0} \\" > sources.lst
	nmake /NOLOGO $(D)\BC.Core.dll
	del sources.lst

cleanall:
	attrib -h *.suo
	del *.suo *.ncb
	pushd copy & nmake clean & popd
	dir /s /b /ad debug*.* release*.* | $(FILTER) ".*" "@rd /s /q {0}" > clean.bat
	dir /s /b /ad bin*.* obj*.* | $(FILTER) ".*" "@rd {0}" >> clean.bat
	clean.bat
	del clean.bat	
	
$(D)\BC.Core.dll: $(D)\BC.Core.UI.resources $(SOURCES) $(D)\BC.Core.ASTs.dll $(D)\BC.Core.Passes.dll $(D)\XTensions.dll
	$(CSC) $(CSCFlags) /target:library /out:$@ $(SOURCES) /r:$(D)\BC.Core.ASTs.dll /r:$(D)\BC.Core.Passes.dll /r:$(D)\XTensions.dll /res:$(D)\BC.Core.UI.resources

$(D)\BC.Core.UI.resources: $(D)\UI.resources
	copy $? $@
	
!INCLUDE "..\copy.mak"
