LIBRARY = System.Runtime.Remoting.dll
-LIB_REFS = System System.Web System.Xml System.Runtime.Serialization.Formatters.Soap
-LIB_MCS_FLAGS = /r:$(corlib) /r:System.dll /r:System.Web.dll \
- /r:System.Xml.dll /r:System.Runtime.Serialization.Formatters.Soap.dll
+LIB_REFS = System System.Xml System.Runtime.Serialization.Formatters.Soap
+LIB_MCS_FLAGS = /r:$(corlib)
+
+ifndef NO_SYSTEM_WEB_DEPENDENCY
+LIB_REFS += System.Web
+endif
TEST_MCS_FLAGS = $(LIB_MCS_FLAGS) -nowarn:618 /r:System.Runtime.Remoting.dll