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 @@ @@ -1,12 +1,10 @@

Microsoft Visual Studio Solution File, Format Version 11.00
# 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}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Tests", "tests\Tests.csproj", "{3C290CBE-CA39-47F6-B3A0-ACD16C5A38C8}"
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}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "generator", "src\generator\generator.csproj", "{AD0F9378-789C-4AF1-B0DD-6DD9A63C3401}"
@ -25,10 +23,6 @@ Global @@ -25,10 +23,6 @@ Global
{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.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.Build.0 = Debug|Any CPU
{A22BF9D9-BBCB-4462-BE08-0F4D5280B180}.Release|Any CPU.ActiveCfg = Release|Any CPU
@ -39,7 +33,7 @@ Global @@ -39,7 +33,7 @@ Global
{AD0F9378-789C-4AF1-B0DD-6DD9A63C3401}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(MonoDevelopProperties) = preSolution
StartupItem = generator\generator.csproj
StartupItem = src\generator\generator.csproj
Policies = $0
$0.TextStylePolicy = $1
$1.inheritsSet = null

10
Makefile.am

@ -1,10 +1,8 @@ @@ -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
SUBDIRS = src
endif
if ENABLE_RELEASE
SUBDIRS = src
SUBDIRS += tests
endif

10
configure.ac

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

38
examples/Hello/Makefile.am

@ -1,29 +1,37 @@ @@ -1,29 +1,37 @@
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
Hello.xml: Hello.h
gccxml -fxml=$@ Hello.h
output gen:
$(RM) -r output
mono $(top_srcdir)/src/generator/bin/Debug/generator.exe -ns=Hello -lib=hello 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
generated: Hello.xml
$(RM) -r generated
mono $(BUILD_DIR)/generator.exe -ns=Hello -lib=hello -o=$@ Hello.xml
Hello.exe: HelloBinding.dll Hello.cs
$(GMCS) -out:$@ -target:exe -r:$(INTEROP_DLL) -r:HelloBinding.dll Hello.cs
$(HELLO_EXE): generated Hello.cs
$(GMCS) -out:$@ -target:exe -r:$(INTEROP_DLL) generated/*.cs Hello.cs
clean:
$(RM) -r output libhello.so Hello.xml Hello.exe HelloBinding.dll
$(RM) -r generated libhello.so Hello.xml $(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 @@ @@ -1,7 +1,2 @@
if ENABLE_DEBUG
SUBDIRS = Hello
endif
if ENABLE_RELEASE
SUBDIRS = Hello
endif
SUBDIRS = Hello

10
src/Makefile.am

@ -1,10 +1,2 @@ @@ -1,10 +1,2 @@
EXTRA_DIST = expansions.m4
#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
SUBDIRS = Mono.VisualC.Interop Mono.VisualC.Code generator

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

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

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

@ -30,7 +30,6 @@ @@ -30,7 +30,6 @@
<IsWebBootstrapper>true</IsWebBootstrapper>
<UseApplicationTrust>false</UseApplicationTrust>
<BootstrapperEnabled>true</BootstrapperEnabled>
<TargetFrameworkProfile />
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
@ -97,4 +96,19 @@ @@ -97,4 +96,19 @@
<Name>Mono.VisualC.Interop</Name>
</ProjectReference>
</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>

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

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

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

@ -29,7 +29,6 @@ @@ -29,7 +29,6 @@
<IsWebBootstrapper>true</IsWebBootstrapper>
<UseApplicationTrust>false</UseApplicationTrust>
<BootstrapperEnabled>true</BootstrapperEnabled>
<TargetFrameworkProfile />
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
@ -100,4 +99,19 @@ @@ -100,4 +99,19 @@
<Install>true</Install>
</BootstrapperPackage>
</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>

61
src/generator/Makefile.am

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

15
src/generator/generator.csproj

@ -97,4 +97,19 @@ @@ -97,4 +97,19 @@
<Install>true</Install>
</BootstrapperPackage>
</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>

47
tests/Makefile.am

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