Browse Source

Fix up build.

+ Rewrite / clean up makefiles.
+ Enable makefile integration in MD to keep everything in sync.
pull/1/head
Alex Corrado 14 years ago
parent
commit
1f3bee8d81
  1. 10
      CPPInterop.sln
  2. 10
      Makefile.am
  3. 10
      configure.ac
  4. 38
      examples/Hello/Makefile.am
  5. 7
      examples/Makefile.am
  6. 10
      src/Makefile.am
  7. 61
      src/Mono.VisualC.Code/Makefile.am
  8. 16
      src/Mono.VisualC.Code/Mono.VisualC.Code.csproj
  9. 56
      src/Mono.VisualC.Interop/Makefile.am
  10. 16
      src/Mono.VisualC.Interop/Mono.VisualC.Interop.csproj
  11. 61
      src/generator/Makefile.am
  12. 15
      src/generator/generator.csproj
  13. 47
      tests/Makefile.am

10
CPPInterop.sln

@ -1,12 +1,10 @@

Microsoft Visual Studio Solution File, Format Version 11.00 Microsoft Visual Studio Solution File, Format Version 11.00
# Visual Studio 2010 # Visual Studio 2010
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Mono.VisualC.Interop", "src\Mono.VisualC.Interop\Mono.VisualC.Interop.csproj", "{4A864586-93C5-4DC1-8A80-F094A88506D7}" Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Mono.VisualC.Interop", "src\Mono.VisualC.Interop\Mono.VisualC.Interop.csproj", "{4A864586-93C5-4DC1-8A80-F094A88506D7}"
EndProject EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Tests", "tests\Tests.csproj", "{3C290CBE-CA39-47F6-B3A0-ACD16C5A38C8}" Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Tests", "tests\Tests.csproj", "{3C290CBE-CA39-47F6-B3A0-ACD16C5A38C8}"
EndProject EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "QtBindings", "src\QtBindings\QtBindings.csproj", "{66212CA6-B8C2-4307-ADDE-DAFEAAB339B9}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Mono.VisualC.Code", "src\Mono.VisualC.Code\Mono.VisualC.Code.csproj", "{A22BF9D9-BBCB-4462-BE08-0F4D5280B180}" Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Mono.VisualC.Code", "src\Mono.VisualC.Code\Mono.VisualC.Code.csproj", "{A22BF9D9-BBCB-4462-BE08-0F4D5280B180}"
EndProject EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "generator", "src\generator\generator.csproj", "{AD0F9378-789C-4AF1-B0DD-6DD9A63C3401}" Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "generator", "src\generator\generator.csproj", "{AD0F9378-789C-4AF1-B0DD-6DD9A63C3401}"
@ -25,10 +23,6 @@ Global
{4A864586-93C5-4DC1-8A80-F094A88506D7}.Debug|Any CPU.Build.0 = Debug|Any CPU {4A864586-93C5-4DC1-8A80-F094A88506D7}.Debug|Any CPU.Build.0 = Debug|Any CPU
{4A864586-93C5-4DC1-8A80-F094A88506D7}.Release|Any CPU.ActiveCfg = Release|Any CPU {4A864586-93C5-4DC1-8A80-F094A88506D7}.Release|Any CPU.ActiveCfg = Release|Any CPU
{4A864586-93C5-4DC1-8A80-F094A88506D7}.Release|Any CPU.Build.0 = Release|Any CPU {4A864586-93C5-4DC1-8A80-F094A88506D7}.Release|Any CPU.Build.0 = Release|Any CPU
{66212CA6-B8C2-4307-ADDE-DAFEAAB339B9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{66212CA6-B8C2-4307-ADDE-DAFEAAB339B9}.Debug|Any CPU.Build.0 = Debug|Any CPU
{66212CA6-B8C2-4307-ADDE-DAFEAAB339B9}.Release|Any CPU.ActiveCfg = Release|Any CPU
{66212CA6-B8C2-4307-ADDE-DAFEAAB339B9}.Release|Any CPU.Build.0 = Release|Any CPU
{A22BF9D9-BBCB-4462-BE08-0F4D5280B180}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {A22BF9D9-BBCB-4462-BE08-0F4D5280B180}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{A22BF9D9-BBCB-4462-BE08-0F4D5280B180}.Debug|Any CPU.Build.0 = Debug|Any CPU {A22BF9D9-BBCB-4462-BE08-0F4D5280B180}.Debug|Any CPU.Build.0 = Debug|Any CPU
{A22BF9D9-BBCB-4462-BE08-0F4D5280B180}.Release|Any CPU.ActiveCfg = Release|Any CPU {A22BF9D9-BBCB-4462-BE08-0F4D5280B180}.Release|Any CPU.ActiveCfg = Release|Any CPU
@ -39,7 +33,7 @@ Global
{AD0F9378-789C-4AF1-B0DD-6DD9A63C3401}.Release|Any CPU.Build.0 = Release|Any CPU {AD0F9378-789C-4AF1-B0DD-6DD9A63C3401}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection EndGlobalSection
GlobalSection(MonoDevelopProperties) = preSolution GlobalSection(MonoDevelopProperties) = preSolution
StartupItem = generator\generator.csproj StartupItem = src\generator\generator.csproj
Policies = $0 Policies = $0
$0.TextStylePolicy = $1 $0.TextStylePolicy = $1
$1.inheritsSet = null $1.inheritsSet = null

10
Makefile.am

@ -1,10 +1,8 @@
EXTRA_DIST = expansions.m4 EXTRA_DIST = m4/expansions.m4
SUBDIRS = src examples
#Warning: This is an automatically generated file, do not edit!
if ENABLE_DEBUG if ENABLE_DEBUG
SUBDIRS = src SUBDIRS += tests
endif
if ENABLE_RELEASE
SUBDIRS = src
endif endif

10
configure.ac

@ -17,9 +17,9 @@ SHAMROCK_EXPAND_DATADIR
AC_PROG_INSTALL AC_PROG_INSTALL
AC_PATH_PROG(GMCS, gmcs, no) AC_PATH_PROG(GMCS, mcs, no)
if test "x$GMCS" = "xno"; then if test "x$GMCS" = "xno"; then
AC_MSG_ERROR([gmcs Not found]) AC_MSG_ERROR([mcs Not found])
fi fi
@ -53,19 +53,15 @@ dnl package checks, per config
AC_CONFIG_FILES([ AC_CONFIG_FILES([
src/Mono.VisualC.Interop/mono.visualc.interop.pc src/Mono.VisualC.Interop/mono.visualc.interop.pc
src/Mono.VisualC.Interop/Makefile src/Mono.VisualC.Interop/Makefile
src/Tests/tests.pc
src/Tests/Makefile
src/QtBindings/qtbindings.pc src/QtBindings/qtbindings.pc
src/QtBindings/Makefile src/QtBindings/Makefile
src/Mono.VisualC.Code/mono.visualc.code.pc src/Mono.VisualC.Code/mono.visualc.code.pc
src/Mono.VisualC.Code/Makefile src/Mono.VisualC.Code/Makefile
src/generator/generator src/generator/generator
src/generator/Makefile src/generator/Makefile
src/QtTest/qttest
src/QtTest/Makefile
src/qt/Makefile src/qt/Makefile
src/Makefile src/Makefile
tests2/Makefile tests/Makefile
examples/Makefile examples/Makefile
examples/Hello/Makefile examples/Hello/Makefile
Makefile Makefile

38
examples/Hello/Makefile.am

@ -1,29 +1,37 @@
top_srcdir=../.. top_srcdir=../..
all: libhello.so Hello.xml Hello.exe if ENABLE_DEBUG
BUILD_DIR=$(top_srcdir)/bin/Debug
endif
libhello.so: Hello.cpp Hello.h if ENABLE_RELEASE
BUILD_DIR=$(top_srcdir)/bin/Release
endif
INTEROP_DLL = \
$(BUILD_DIR)/Mono.VisualC.Interop.dll
HELLO_EXE = \
$(BUILD_DIR)/Hello.exe
all: $(BUILD_DIR)/libhello.so Hello.xml $(HELLO_EXE)
$(BUILD_DIR)/libhello.so: Hello.cpp Hello.h
$(CXX) -fPIC --shared -o $@ Hello.cpp $(CXX) -fPIC --shared -o $@ Hello.cpp
Hello.xml: Hello.h Hello.xml: Hello.h
gccxml -fxml=$@ Hello.h gccxml -fxml=$@ Hello.h
output gen: generated: Hello.xml
$(RM) -r output $(RM) -r generated
mono $(top_srcdir)/src/generator/bin/Debug/generator.exe -ns=Hello -lib=hello Hello.xml mono $(BUILD_DIR)/generator.exe -ns=Hello -lib=hello -o=$@ Hello.xml
INTEROP_DLL = \
$(top_srcdir)/src/Mono.VisualC.Interop/bin/Debug/Mono.VisualC.Interop.dll
HelloBinding.dll: output
$(GMCS) -out:$@ -target:library -r:$(INTEROP_DLL) output/*.cs
Hello.exe: HelloBinding.dll Hello.cs $(HELLO_EXE): generated Hello.cs
$(GMCS) -out:$@ -target:exe -r:$(INTEROP_DLL) -r:HelloBinding.dll Hello.cs $(GMCS) -out:$@ -target:exe -r:$(INTEROP_DLL) generated/*.cs Hello.cs
clean: clean:
$(RM) -r output libhello.so Hello.xml Hello.exe HelloBinding.dll $(RM) -r generated libhello.so Hello.xml $(HELLO_EXE)
run: Hello.exe run: Hello.exe
MONO_PATH=$(top_srcdir)/src/Mono.VisualC.Interop/bin/Debug mono Hello.exe mono --debug $(HELLO_EXE)

7
examples/Makefile.am

@ -1,7 +1,2 @@
if ENABLE_DEBUG SUBDIRS = Hello
SUBDIRS = Hello
endif
if ENABLE_RELEASE
SUBDIRS = Hello
endif

10
src/Makefile.am

@ -1,10 +1,2 @@
EXTRA_DIST = expansions.m4 SUBDIRS = Mono.VisualC.Interop Mono.VisualC.Code generator
#Warning: This is an automatically generated file, do not edit!
if ENABLE_DEBUG
SUBDIRS = Mono.VisualC.Interop QtBindings Mono.VisualC.Code generator QtTest
endif
if ENABLE_RELEASE
SUBDIRS = Mono.VisualC.Interop QtBindings Mono.VisualC.Code generator QtTest
endif

61
src/Mono.VisualC.Code/Makefile.am

@ -1,50 +1,45 @@
EXTRA_DIST = EXTRA_DIST = m4/expansions.m4
# Warning: This is an automatically generated file, do not edit!
if ENABLE_DEBUG if ENABLE_DEBUG
ASSEMBLY_COMPILER_COMMAND = gmcs ASSEMBLY_COMPILER_COMMAND = mcs
ASSEMBLY_COMPILER_FLAGS = -noconfig -codepage:utf8 -warn:4 -optimize- -debug "-define:DEBUG" ASSEMBLY_COMPILER_FLAGS = -noconfig -codepage:utf8 -warn:4 -optimize- -debug "-define:DEBUG"
ASSEMBLY = bin/Debug/Mono.VisualC.Code.dll BUILD_DIR = $(top_srcdir)/bin/Debug
ASSEMBLY = $(BUILD_DIR)/Mono.VisualC.Code.dll
ASSEMBLY_MDB = $(ASSEMBLY).mdb ASSEMBLY_MDB = $(ASSEMBLY).mdb
COMPILE_TARGET = library
PROJECT_REFERENCES = \
../Mono.VisualC.Interop/bin/Debug/Mono.VisualC.Interop.dll
BUILD_DIR = bin/Debug
MONO_VISUALC_INTEROP_DLL_SOURCE=../Mono.VisualC.Interop/bin/Debug/Mono.VisualC.Interop.dll MONO_VISUALC_INTEROP_DLL_SOURCE=$(BUILD_DIR)/Mono.VisualC.Interop.dll
MONO_VISUALC_INTEROP_DLL=$(BUILD_DIR)/Mono.VisualC.Interop.dll MONO_VISUALC_INTEROP_DLL=$(BUILD_DIR)/Mono.VisualC.Interop.dll
MONO_VISUALC_CODE_DLL_MDB_SOURCE=bin/Debug/Mono.VisualC.Code.dll.mdb MONO_VISUALC_CODE_DLL_MDB_SOURCE=$(BUILD_DIR)/Mono.VisualC.Code.dll.mdb
MONO_VISUALC_CODE_DLL_MDB=$(BUILD_DIR)/Mono.VisualC.Code.dll.mdb MONO_VISUALC_CODE_DLL_MDB=$(BUILD_DIR)/Mono.VisualC.Code.dll.mdb
CPPINTEROP_DLL=
endif endif
if ENABLE_RELEASE if ENABLE_RELEASE
ASSEMBLY_COMPILER_COMMAND = gmcs ASSEMBLY_COMPILER_COMMAND = mcs
ASSEMBLY_COMPILER_FLAGS = -noconfig -codepage:utf8 -warn:4 -optimize- ASSEMBLY_COMPILER_FLAGS = -noconfig -codepage:utf8 -warn:4 -optimize+
ASSEMBLY = bin/Release/Mono.VisualC.Code.dll BUILD_DIR = $(top_srcdir)/bin/Release
ASSEMBLY = $(BUILD_DIR)/Mono.VisualC.Code.dll
ASSEMBLY_MDB = ASSEMBLY_MDB =
COMPILE_TARGET = library
PROJECT_REFERENCES = \
../Mono.VisualC.Interop/bin/Release/CPPInterop.dll
BUILD_DIR = bin/Release
MONO_VISUALC_INTEROP_DLL= MONO_VISUALC_INTEROP_DLL_SOURCE=$(BUILD_DIR)/Mono.VisualC.Interop.dll
MONO_VISUALC_INTEROP_DLL=$(BUILD_DIR)/Mono.VisualC.Interop.dll
MONO_VISUALC_CODE_DLL_MDB= MONO_VISUALC_CODE_DLL_MDB=
CPPINTEROP_DLL_SOURCE=../Mono.VisualC.Interop/bin/Release/CPPInterop.dll
CPPINTEROP_DLL=$(BUILD_DIR)/CPPInterop.dll
endif endif
COMPILE_TARGET = library
PROJECT_REFERENCES = \
$(BUILD_DIR)/Mono.VisualC.Interop.dll
AL=al2 AL=al2
SATELLITE_ASSEMBLY_NAME=$(notdir $(basename $(ASSEMBLY))).resources.dll SATELLITE_ASSEMBLY_NAME=$(notdir $(basename $(ASSEMBLY))).resources.dll
PROGRAMFILES = \ PROGRAMFILES = \
$(MONO_VISUALC_INTEROP_DLL) \ $(MONO_VISUALC_INTEROP_DLL) \
$(MONO_VISUALC_CODE_DLL_MDB) \ $(MONO_VISUALC_CODE_DLL_MDB)
$(CPPINTEROP_DLL)
LINUX_PKGCONFIG = \ LINUX_PKGCONFIG = \
$(MONO_VISUALC_CODE_PC) $(MONO_VISUALC_CODE_PC)
@ -54,14 +49,9 @@ RESGEN=resgen2
all: $(ASSEMBLY) $(PROGRAMFILES) $(LINUX_PKGCONFIG) all: $(ASSEMBLY) $(PROGRAMFILES) $(LINUX_PKGCONFIG)
FILES = \ FILES = \
AssemblyInfo.cs \
Access.cs \ Access.cs \
CodeAtom.cs \ AssemblyInfo.cs \
CodeContainer.cs \
CodeUnit.cs \
CodeDomExtensions.cs \
NameTypePair.cs \
Atoms/Class.cs \ Atoms/Class.cs \
Atoms/Enumeration.cs \ Atoms/Enumeration.cs \
Atoms/Field.cs \ Atoms/Field.cs \
@ -69,7 +59,12 @@ FILES = \
Atoms/Namespace.cs \ Atoms/Namespace.cs \
Atoms/Preprocessor.cs \ Atoms/Preprocessor.cs \
Atoms/Property.cs \ Atoms/Property.cs \
Atoms/Union.cs Atoms/Union.cs \
CodeAtom.cs \
CodeContainer.cs \
CodeDomExtensions.cs \
CodeUnit.cs \
NameTypePair.cs
DATA_FILES = DATA_FILES =
@ -80,6 +75,7 @@ EXTRAS = \
mono.visualc.code.pc.in mono.visualc.code.pc.in
REFERENCES = \ REFERENCES = \
../Mono.VisualC.Interop/bin/Debug/Mono.VisualC.Interop.dll \
System \ System \
System.Core System.Core
@ -93,7 +89,6 @@ MONO_VISUALC_CODE_PC = $(BUILD_DIR)/mono.visualc.code.pc
$(eval $(call emit-deploy-target,MONO_VISUALC_INTEROP_DLL)) $(eval $(call emit-deploy-target,MONO_VISUALC_INTEROP_DLL))
$(eval $(call emit-deploy-wrapper,MONO_VISUALC_CODE_PC,mono.visualc.code.pc)) $(eval $(call emit-deploy-wrapper,MONO_VISUALC_CODE_PC,mono.visualc.code.pc))
$(eval $(call emit-deploy-target,CPPINTEROP_DLL))
$(eval $(call emit_resgen_targets)) $(eval $(call emit_resgen_targets))

16
src/Mono.VisualC.Code/Mono.VisualC.Code.csproj

@ -30,7 +30,6 @@
<IsWebBootstrapper>true</IsWebBootstrapper> <IsWebBootstrapper>true</IsWebBootstrapper>
<UseApplicationTrust>false</UseApplicationTrust> <UseApplicationTrust>false</UseApplicationTrust>
<BootstrapperEnabled>true</BootstrapperEnabled> <BootstrapperEnabled>true</BootstrapperEnabled>
<TargetFrameworkProfile />
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols> <DebugSymbols>true</DebugSymbols>
@ -97,4 +96,19 @@
<Name>Mono.VisualC.Interop</Name> <Name>Mono.VisualC.Interop</Name>
</ProjectReference> </ProjectReference>
</ItemGroup> </ItemGroup>
<ProjectExtensions>
<MonoDevelop>
<Properties>
<MonoDevelop.Autotools.MakefileInfo IntegrationEnabled="true" RelativeMakefileName="Makefile.am" SyncReferences="true" IsAutotoolsProject="true" RelativeConfigureInPath="../..">
<BuildFilesVar Sync="true" Name="FILES" />
<DeployFilesVar />
<ResourcesVar Sync="true" Name="RESOURCES" />
<OthersVar />
<GacRefVar Sync="true" Name="REFERENCES" />
<AsmRefVar Sync="true" Name="REFERENCES" />
<ProjectRefVar Sync="true" Name="REFERENCES" />
</MonoDevelop.Autotools.MakefileInfo>
</Properties>
</MonoDevelop>
</ProjectExtensions>
</Project> </Project>

56
src/Mono.VisualC.Interop/Makefile.am

@ -1,16 +1,13 @@
EXTRA_DIST = EXTRA_DIST = m4/expansions.m4
# Warning: This is an automatically generated file, do not edit!
if ENABLE_DEBUG if ENABLE_DEBUG
ASSEMBLY_COMPILER_COMMAND = gmcs ASSEMBLY_COMPILER_COMMAND = mcs
ASSEMBLY_COMPILER_FLAGS = -noconfig -codepage:utf8 -warn:4 -optimize- -debug "-define:DEBUG" ASSEMBLY_COMPILER_FLAGS = -noconfig -codepage:utf8 -warn:4 -optimize- -debug "-define:DEBUG"
ASSEMBLY = bin/Debug/Mono.VisualC.Interop.dll BUILD_DIR = $(top_srcdir)/bin/Debug
ASSEMBLY = $(BUILD_DIR)/Mono.VisualC.Interop.dll
ASSEMBLY_MDB = $(ASSEMBLY).mdb ASSEMBLY_MDB = $(ASSEMBLY).mdb
COMPILE_TARGET = library
PROJECT_REFERENCES =
BUILD_DIR = bin/Debug
MONO_VISUALC_INTEROP_DLL_MDB_SOURCE=bin/Debug/Mono.VisualC.Interop.dll.mdb MONO_VISUALC_INTEROP_DLL_MDB_SOURCE=bin/Debug/Mono.VisualC.Interop.dll.mdb
MONO_VISUALC_INTEROP_DLL_MDB=$(BUILD_DIR)/Mono.VisualC.Interop.dll.mdb MONO_VISUALC_INTEROP_DLL_MDB=$(BUILD_DIR)/Mono.VisualC.Interop.dll.mdb
@ -18,18 +15,20 @@ MONO_VISUALC_INTEROP_DLL_MDB=$(BUILD_DIR)/Mono.VisualC.Interop.dll.mdb
endif endif
if ENABLE_RELEASE if ENABLE_RELEASE
ASSEMBLY_COMPILER_COMMAND = gmcs ASSEMBLY_COMPILER_COMMAND = mcs
ASSEMBLY_COMPILER_FLAGS = -noconfig -codepage:utf8 -warn:4 -optimize- ASSEMBLY_COMPILER_FLAGS = -noconfig -codepage:utf8 -warn:4 -optimize+
ASSEMBLY = bin/Release/CPPInterop.dll BUILD_DIR = $(top_srcdir)/bin/Release
ASSEMBLY = $(BUILD_DIR)/Mono.VisualC.Interop.dll
ASSEMBLY_MDB = ASSEMBLY_MDB =
COMPILE_TARGET = library
PROJECT_REFERENCES =
BUILD_DIR = bin/Release
MONO_VISUALC_INTEROP_DLL_MDB= MONO_VISUALC_INTEROP_DLL_MDB=
endif endif
COMPILE_TARGET = library
PROJECT_REFERENCES =
AL=al2 AL=al2
SATELLITE_ASSEMBLY_NAME=$(notdir $(basename $(ASSEMBLY))).resources.dll SATELLITE_ASSEMBLY_NAME=$(notdir $(basename $(ASSEMBLY))).resources.dll
@ -44,31 +43,30 @@ RESGEN=resgen2
all: $(ASSEMBLY) $(PROGRAMFILES) $(LINUX_PKGCONFIG) all: $(ASSEMBLY) $(PROGRAMFILES) $(LINUX_PKGCONFIG)
FILES = \ FILES = \
CppLibrary.cs \
AssemblyInfo.cs \
ABI/CppAbi.cs \ ABI/CppAbi.cs \
Interfaces.cs \ ABI/Impl/ItaniumAbi.cs \
ABI/Impl/MsvcAbi.cs \
ABI/Impl/MsvcTypeInfo.cs \
ABI/Impl/VirtualOnlyAbi.cs \
ABI/MethodType.cs \
ABI/VTable.cs \
ABI/VTableManaged.cs \ ABI/VTableManaged.cs \
AssemblyInfo.cs \
Attributes.cs \ Attributes.cs \
CppInstancePtr.cs \
CppField.cs \ CppField.cs \
ABI/VTable.cs \ CppInstancePtr.cs \
ABI/MethodType.cs \ CppLibrary.cs \
ABI/Impl/ItaniumAbi.cs \ CppModifiers.cs \
ABI/Impl/VirtualOnlyAbi.cs \
ABI/Impl/MsvcAbi.cs \
CppObjectMarshaler.cs \ CppObjectMarshaler.cs \
CppType.cs \ CppType.cs \
CppTypeInfo.cs \ CppTypeInfo.cs \
ABI/Impl/ItaniumTypeInfo.cs \ Interfaces.cs \
Util/DelegateTypeCache.cs \
Util/IEnumerableTransform.cs \ Util/IEnumerableTransform.cs \
Util/LazyGeneratedList.cs \ Util/LazyGeneratedList.cs \
Util/DelegateTypeCache.cs \
Util/ReflectionHelper.cs \
ABI/Impl/MsvcTypeInfo.cs \
Util/MethodSignature.cs \ Util/MethodSignature.cs \
CppModifiers.cs Util/ReflectionHelper.cs
DATA_FILES = DATA_FILES =

16
src/Mono.VisualC.Interop/Mono.VisualC.Interop.csproj

@ -29,7 +29,6 @@
<IsWebBootstrapper>true</IsWebBootstrapper> <IsWebBootstrapper>true</IsWebBootstrapper>
<UseApplicationTrust>false</UseApplicationTrust> <UseApplicationTrust>false</UseApplicationTrust>
<BootstrapperEnabled>true</BootstrapperEnabled> <BootstrapperEnabled>true</BootstrapperEnabled>
<TargetFrameworkProfile />
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols> <DebugSymbols>true</DebugSymbols>
@ -100,4 +99,19 @@
<Install>true</Install> <Install>true</Install>
</BootstrapperPackage> </BootstrapperPackage>
</ItemGroup> </ItemGroup>
<ProjectExtensions>
<MonoDevelop>
<Properties>
<MonoDevelop.Autotools.MakefileInfo IntegrationEnabled="true" RelativeMakefileName="Makefile.am" SyncReferences="true" IsAutotoolsProject="true" RelativeConfigureInPath="../..">
<BuildFilesVar Sync="true" Name="FILES" />
<DeployFilesVar />
<ResourcesVar Sync="true" Name="RESOURCES" />
<OthersVar />
<GacRefVar Sync="true" Name="REFERENCES" />
<AsmRefVar Sync="true" Name="REFERENCES" />
<ProjectRefVar Sync="true" Name="REFERENCES" />
</MonoDevelop.Autotools.MakefileInfo>
</Properties>
</MonoDevelop>
</ProjectExtensions>
</Project> </Project>

61
src/generator/Makefile.am

@ -1,50 +1,45 @@
EXTRA_DIST = EXTRA_DIST = m4/expansions.m4
# Warning: This is an automatically generated file, do not edit!
if ENABLE_DEBUG if ENABLE_DEBUG
ASSEMBLY_COMPILER_COMMAND = gmcs ASSEMBLY_COMPILER_COMMAND = mcs
ASSEMBLY_COMPILER_FLAGS = -noconfig -codepage:utf8 -warn:4 -optimize- -debug "-define:DEBUG" ASSEMBLY_COMPILER_FLAGS = -noconfig -codepage:utf8 -warn:4 -optimize- -debug "-define:DEBUG"
ASSEMBLY = bin/Debug/generator.exe BUILD_DIR = $(top_srcdir)/bin/Debug
ASSEMBLY = $(BUILD_DIR)/generator.exe
ASSEMBLY_MDB = $(ASSEMBLY).mdb ASSEMBLY_MDB = $(ASSEMBLY).mdb
COMPILE_TARGET = exe
PROJECT_REFERENCES = \
../Mono.VisualC.Interop/bin/Debug/Mono.VisualC.Interop.dll
BUILD_DIR = bin/Debug
MONO_VISUALC_INTEROP_DLL_SOURCE=../Mono.VisualC.Interop/bin/Debug/Mono.VisualC.Interop.dll MONO_VISUALC_INTEROP_DLL_SOURCE=$(BUILD_DIR)/Mono.VisualC.Interop.dll
MONO_VISUALC_INTEROP_DLL=$(BUILD_DIR)/Mono.VisualC.Interop.dll MONO_VISUALC_INTEROP_DLL=$(BUILD_DIR)/Mono.VisualC.Interop.dll
GENERATOR_EXE_MDB_SOURCE=bin/Debug/generator.exe.mdb GENERATOR_EXE_MDB_SOURCE=$(BUILD_DIR)/generator.exe.mdb
GENERATOR_EXE_MDB=$(BUILD_DIR)/generator.exe.mdb GENERATOR_EXE_MDB=$(BUILD_DIR)/generator.exe.mdb
CPPINTEROP_DLL=
endif endif
if ENABLE_RELEASE if ENABLE_RELEASE
ASSEMBLY_COMPILER_COMMAND = gmcs ASSEMBLY_COMPILER_COMMAND = mcs
ASSEMBLY_COMPILER_FLAGS = -noconfig -codepage:utf8 -warn:4 -optimize- ASSEMBLY_COMPILER_FLAGS = -noconfig -codepage:utf8 -warn:4 -optimize+
ASSEMBLY = bin/Release/generator.exe BUILD_DIR = $(top_srcdir)/bin/Release
ASSEMBLY = $(BUILD_DIR)/generator.exe
ASSEMBLY_MDB = ASSEMBLY_MDB =
COMPILE_TARGET = exe
PROJECT_REFERENCES = \
../Mono.VisualC.Interop/bin/Release/CPPInterop.dll
BUILD_DIR = bin/Release
MONO_VISUALC_INTEROP_DLL= MONO_VISUALC_INTEROP_DLL_SOURCE=$(BUILD_DIR)/Mono.VisualC.Interop.dll
GENERATOR_EXE_MDB= MONO_VISUALC_INTEROP_DLL=$(BUILD_DIR)/Mono.VisualC.Interop.dll
CPPINTEROP_DLL_SOURCE=../Mono.VisualC.Interop/bin/Release/CPPInterop.dll GENERATOR_EXE_MDB=
CPPINTEROP_DLL=$(BUILD_DIR)/CPPInterop.dll
endif endif
COMPILE_TARGET = exe
PROJECT_REFERENCES = \
$(BUILD_DIR)/Mono.VisualC.Interop.dll
AL=al2 AL=al2
SATELLITE_ASSEMBLY_NAME=$(notdir $(basename $(ASSEMBLY))).resources.dll SATELLITE_ASSEMBLY_NAME=$(notdir $(basename $(ASSEMBLY))).resources.dll
PROGRAMFILES = \ PROGRAMFILES = \
$(MONO_VISUALC_INTEROP_DLL) \ $(MONO_VISUALC_INTEROP_DLL) \
$(GENERATOR_EXE_MDB) \ $(GENERATOR_EXE_MDB)
$(CPPINTEROP_DLL)
BINARIES = \ BINARIES = \
$(GENERATOR) $(GENERATOR)
@ -54,13 +49,13 @@ RESGEN=resgen2
all: $(ASSEMBLY) $(PROGRAMFILES) $(BINARIES) all: $(ASSEMBLY) $(PROGRAMFILES) $(BINARIES)
FILES = \ FILES = \
Generator.cs \
Options.cs \
Node.cs \
Class.cs \ Class.cs \
Method.cs \
Field.cs \ Field.cs \
Generator.cs \
Method.cs \
Node.cs \
Options.cs \
Parameter.cs \ Parameter.cs \
Property.cs Property.cs
@ -72,10 +67,12 @@ EXTRAS = \
generator.in generator.in
REFERENCES = \ REFERENCES = \
../Mono.VisualC.Code/bin/Debug/Mono.VisualC.Code.dll \
../Mono.VisualC.Interop/bin/Debug/Mono.VisualC.Interop.dll \
System \ System \
System.Core \
System.Xml \ System.Xml \
System.Xml.Linq \ System.Xml.Linq
System.Core
DLL_REFERENCES = DLL_REFERENCES =

15
src/generator/generator.csproj

@ -97,4 +97,19 @@
<Install>true</Install> <Install>true</Install>
</BootstrapperPackage> </BootstrapperPackage>
</ItemGroup> </ItemGroup>
<ProjectExtensions>
<MonoDevelop>
<Properties>
<MonoDevelop.Autotools.MakefileInfo IntegrationEnabled="true" RelativeMakefileName="Makefile.am" SyncReferences="true" IsAutotoolsProject="true" RelativeConfigureInPath="../..">
<BuildFilesVar Sync="true" Name="FILES" />
<DeployFilesVar />
<ResourcesVar Sync="true" Name="RESOURCES" />
<OthersVar />
<GacRefVar Sync="true" Name="REFERENCES" />
<AsmRefVar Sync="true" Name="REFERENCES" />
<ProjectRefVar Sync="true" Name="REFERENCES" />
</MonoDevelop.Autotools.MakefileInfo>
</Properties>
</MonoDevelop>
</ProjectExtensions>
</Project> </Project>

47
tests/Makefile.am

@ -1,31 +1,44 @@
top_srcdir = ../ top_srcdir = ../
BUILD_DIR = $(top_srcdir)/bin/Debug
INTEROP_DLL = \ INTEROP_DLL = \
$(top_srcdir)/src/Mono.VisualC.Interop/bin/Debug/Mono.VisualC.Interop.dll $(BUILD_DIR)/Mono.VisualC.Interop.dll
all: test.exe TEST_DLL = $(BUILD_DIR)/Test.dll
test.xml: test.h HDR = \
gccxml -fxml=$@ --gccxml-cxxflags -c test.h Native/test.h
libTest.so: test.h test.cpp NATIVE = \
g++ -fPIC --shared -o $@ test.cpp Native/NUnit.cpp \
Native/test.cpp
libTest-inline.so: test.h test.cpp MANAGED = \
g++ -fPIC --shared -fkeep-inline-functions -o $@ test.cpp Support/CppMockObject.cs \
Support/CppNUnitAsserts.cs \
test.cs
all: $(TEST_DLL)
test.xml: $(HDR)
gccxml -fxml=$@ --gccxml-cxxflags -c $(HDR)
$(BUILD_DIR)/libTest.so: $(HEADERS) $(NATIVE)
g++ -fPIC --shared -o $@ $(NATIVE)
$(BUILD_DIR)/libTest-inline.so: $(HEADERS) $(NATIVE)
g++ -fPIC --shared -fkeep-inline-functions -o $@ $(NATIVE)
generated: test.xml generated: test.xml
$(RM) -r generated $(RM) -r generated
mono --debug $(top_srcdir)/src/generator2/bin/Debug/generator.exe -o=generated -ns=CppTests -lib=Test test.xml mono --debug $(BUILD_DIR)/generator.exe -o=$@ -ns=CppTests -lib=Test test.xml
CppTestBinding.dll: generated
mcs -out:$@ -target:library -unsafe -r:$(INTEROP_DLL) generated/*.cs
test.exe: test.cs TestDriver.cs CppTestBinding.dll libTest.so libTest-inline.so $(TEST_DLL): generated $(MANAGED) $(BUILD_DIR)/libTest.so $(BUILD_DIR)/libTest-inline.so
mcs -out:$@ -target:exe -r:$(INTEROP_DLL) -r:CppTestBinding.dll test.cs TestDriver.cs mcs -out:$@ -target:library -unsafe -r:$(INTEROP_DLL) generated/*.cs $(MANAGED)
clean: clean:
$(RM) -rf CppTestBinding.dll test.exe generated libTest.so libTest-inline.so test.xml $(RM) -rf $(TEST_DLL) generated $(BUILD_DIR)/libTest.so $(BUILD_DIR)/libTest-inline.so test.xml
run: test.exe run: $(TEST_DLL)
MONO_PATH=$(top_srcdir)/src/Mono.VisualC.Interop/bin/Debug mono test.exe nunit-console -nologo $(TEST_DLL)
Loading…
Cancel
Save