[chronojump] Simplify makefile rules for CesarPlayer



commit 02717f96347bd5764c2f20e8b054447a90749e9a
Author: Andoni Morales Alastruey <ylatuya gmail com>
Date:   Mon Oct 14 13:26:35 2013 +0200

    Simplify makefile rules for CesarPlayer

 CesarPlayer/Makefile.am    |   80 ++++---------------------------------------
 build/build.environment.mk |   10 ++++--
 2 files changed, 15 insertions(+), 75 deletions(-)
---
diff --git a/CesarPlayer/Makefile.am b/CesarPlayer/Makefile.am
index dcf1d12..358d751 100644
--- a/CesarPlayer/Makefile.am
+++ b/CesarPlayer/Makefile.am
@@ -1,49 +1,9 @@
+ASSEMBLY = CesarPlayer
+TARGET = library
 
-EXTRA_DIST =  
+LINK = $(REF_DEP_CESARPLAYER)
 
-if ENABLE_DEBUG
-ASSEMBLY_COMPILER_COMMAND = $(MCS)
-ASSEMBLY_COMPILER_FLAGS =  -noconfig -codepage:utf8 -unsafe -warn:4 -optimize+ -debug -define:DEBUG
-ASSEMBLY = bin/Debug/CesarPlayer.dll
-ASSEMBLY_MDB = $(ASSEMBLY).mdb
-COMPILE_TARGET = library
-PROJECT_REFERENCES = 
-BUILD_DIR = bin/Debug
-CESARPLAYER_DLL_MDB_SOURCE=bin/Debug/CesarPlayer.dll.mdb
-CESARPLAYER_DLL_MDB=$(BUILD_DIR)/CesarPlayer.dll.mdb
-CESARPLAYER_DLL_CONFIG_SOURCE = CesarPlayer.dll.config
-CESARPLAYER_DLL_CONFIG = $(BUILD_DIR)/CesarPlayer.dll.config
-
-endif
-
-if ENABLE_RELEASE
-ASSEMBLY_COMPILER_COMMAND = $(MCS)
-ASSEMBLY_COMPILER_FLAGS =  -noconfig -codepage:utf8 -unsafe -warn:4 -optimize+ 
-ASSEMBLY = bin/Release/CesarPlayer.dll
-ASSEMBLY_MDB = $(ASSEMBLY).mdb
-COMPILE_TARGET = library
-PROJECT_REFERENCES = 
-BUILD_DIR = bin/Release
-CESARPLAYER_DLL_MDB_SOURCE=
-CESARPLAYER_DLL_MDB=
-CESARPLAYER_DLL_CONFIG_SOURCE = CesarPlayer.dll.config
-CESARPLAYER_DLL_CONFIG = $(BUILD_DIR)/CesarPlayer.dll.config
-
-
-endif
-
-AL=al2
-SATELLITE_ASSEMBLY_NAME=$(notdir $(basename $(ASSEMBLY))).resources.dll
-
-PROGRAMFILES = \
-       $(CESARPLAYER_DLL_MDB)\
-       $(CESARPLAYER_DLL_CONFIG)
-
-RESGEN=resgen2
-       
-all: $(ASSEMBLY) $(PROGRAMFILES) 
-
-FILES = \
+SOURCES = \
        AssemblyInfo.cs \
        gtk-gui/generated.cs \
        Common/Constants.cs\
@@ -78,36 +38,12 @@ FILES = \
        Utils/MediaFile.cs \
        Utils/PreviewMediaFile.cs
 
-DATA_FILES = 
-
 RESOURCES = \
        gtk-gui/objects.xml \
-       gtk-gui/gui.stetic 
-
-EXTRAS = \
-       cesarplayer.key\
-       CesarPlayer.dll.config\
-       AssemblyInfo.cs.in
-
-REFERENCES =  \
-       System \
-       Mono.Posix \
-       System.Drawing \
-       $(GTK_SHARP_20_LIBS) \
-       $(GLIB_SHARP_20_LIBS)
-
-DLL_REFERENCES = 
-
-CLEANFILES = $(PROGRAMFILES) 
-
-include $(top_srcdir)/Makefile.include
+       gtk-gui/gui.stetic
 
-$(eval $(call emit-deploy-target,CESARPLAYER_DLL_CONFIG))
+DLLCONFIG = CesarPlayer.dll.config
 
-$(eval $(call emit_resgen_targets))
-$(build_xamlg_list): %.xaml.g.cs: %.xaml
-       xamlg '$<'
+include $(top_srcdir)/build/build.mk
 
-$(ASSEMBLY) $(ASSEMBLY_MDB): $(build_sources) $(build_resources) $(build_datafiles) $(DLL_REFERENCES) 
$(PROJECT_REFERENCES) $(build_xamlg_list) $(build_satellite_assembly_list)
-       mkdir -p $(shell dirname $(ASSEMBLY))
-       $(ASSEMBLY_COMPILER_COMMAND) $(ASSEMBLY_COMPILER_FLAGS) -out:$(ASSEMBLY) -target:$(COMPILE_TARGET) 
$(build_sources_embed) $(build_resources_embed) $(build_references_ref)
+EXTRA_DIST += CesarPlayer.dll.config
diff --git a/build/build.environment.mk b/build/build.environment.mk
index 0ce133f..9ee798b 100644
--- a/build/build.environment.mk
+++ b/build/build.environment.mk
@@ -16,12 +16,16 @@ LINK_SYSTEM_XML_LINQ = -r:System.Xml.Linq
 LINK_MICROSOFT_CSHARP = -r:Microsoft.CSharp
 LINK_CAIRO = -r:Mono.Cairo
 LINK_MONO_POSIX = -r:Mono.Posix
-LINK_GLIB = $(GLIBSHARP_LIBS)
-LINK_GTK = $(GTKSHARP_LIBS)
-LINK_GCONF = $(GCONFSHARP_LIBS)
+LINK_GLIB = $(GLIB_SHARP_20_LIBS)
+LINK_GTK = $(GTK_SHARP_20_LIBS)
 LINK_RDOTNET = -r:$(DIR_BIN)/RDotNet.dll
 LINK_RDOTNET_NATIVE = -r:$(DIR_BIN)/RDotNet.NativeLibrary.dll
 
+REF_DEP_CESARPLAYER = \
+       $(LINK_SYSTEM) \
+       $(LINK_MONO_POSIX) \
+       $(LINK_GLIB) \
+       $(LINK_GTK)
 
 REF_DEP_RDOTNET_NATIVE = \
        $(LINK_SYSTEM) \


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]