
EXTRA_DIST = $(srcdir)/custom-hooks.make Makefile

# Warning: This is an automatically generated file, do not edit!

srcdir=.
top_srcdir=..

include $(top_srcdir)/config.make

ifeq ($(CONFIG),DEBUG)
ASSEMBLY_COMPILER_COMMAND = gmcs
ASSEMBLY_COMPILER_FLAGS =  -noconfig -codepage:utf8 -warn:3 -optimize- -debug "-define:DEBUG"
ASSEMBLY = bin/Debug/Basenji.exe
ASSEMBLY_MDB = $(ASSEMBLY).mdb
COMPILE_TARGET = winexe
PROJECT_REFERENCES =  \
	../Platform/bin/Debug/Platform.dll \
	../VolumeDB/bin/Debug/VolumeDB.dll
BUILD_DIR = bin/Debug

BASENJI_EXE_MDB_SOURCE=bin/Debug/Basenji.exe.mdb
BASENJI_EXE_MDB=$(BUILD_DIR)/Basenji.exe.mdb
LIBEXTRACTOR_DLL_CONFIG_SOURCE=LibExtractor.dll.config
BASENJI_EXE_CONFIG_SOURCE=Basenji.exe.config
PLATFORM_DLL_SOURCE=../Platform/bin/Debug/Platform.dll
PLATFORM_DLL_MDB_SOURCE=../Platform/bin/Debug/Platform.dll.mdb
PLATFORM_DLL_MDB=$(BUILD_DIR)/Platform.dll.mdb
VOLUMEDB_DLL_SOURCE=../VolumeDB/bin/Debug/VolumeDB.dll
PLATFORM_COMMON_DB_DLL_SOURCE=../Platform.Common.DB/bin/Debug/Platform.Common.DB.dll
PLATFORM_COMMON_DB_DLL_MDB_SOURCE=../Platform.Common.DB/bin/Debug/Platform.Common.DB.dll.mdb
PLATFORM_COMMON_DB_DLL_MDB=$(BUILD_DIR)/Platform.Common.DB.dll.mdb
LIBEXTRACTOR_DLL_SOURCE=../LibExtractor/bin/Debug/LibExtractor.dll
LIBEXTRACTOR_DLL_MDB_SOURCE=../LibExtractor/bin/Debug/LibExtractor.dll.mdb
LIBEXTRACTOR_DLL_MDB=$(BUILD_DIR)/LibExtractor.dll.mdb
MUSICBRAINZ_DLL_SOURCE=../MusicBrainz/bin/Debug/MusicBrainz.dll
MUSICBRAINZ_DLL_MDB_SOURCE=../MusicBrainz/bin/Debug/MusicBrainz.dll.mdb
MUSICBRAINZ_DLL_MDB=$(BUILD_DIR)/MusicBrainz.dll.mdb
VOLUMEDB_DLL_MDB_SOURCE=../VolumeDB/bin/Debug/VolumeDB.dll.mdb
VOLUMEDB_DLL_MDB=$(BUILD_DIR)/VolumeDB.dll.mdb

endif

ifeq ($(CONFIG),RELEASE)
ASSEMBLY_COMPILER_COMMAND = gmcs
ASSEMBLY_COMPILER_FLAGS =  -noconfig -codepage:utf8 -warn:3 -optimize+
ASSEMBLY = bin/Release/Basenji.exe
ASSEMBLY_MDB = 
COMPILE_TARGET = winexe
PROJECT_REFERENCES =  \
	../Platform/bin/Release/Platform.dll \
	../VolumeDB/bin/Release/VolumeDB.dll
BUILD_DIR = bin/Release

BASENJI_EXE_MDB=
LIBEXTRACTOR_DLL_CONFIG_SOURCE=LibExtractor.dll.config
BASENJI_EXE_CONFIG_SOURCE=Basenji.exe.config
PLATFORM_DLL_SOURCE=../Platform/bin/Release/Platform.dll
PLATFORM_DLL_MDB=
VOLUMEDB_DLL_SOURCE=../VolumeDB/bin/Release/VolumeDB.dll
PLATFORM_COMMON_DB_DLL_SOURCE=../Platform.Common.DB/bin/Release/Platform.Common.DB.dll
PLATFORM_COMMON_DB_DLL_MDB=
LIBEXTRACTOR_DLL_SOURCE=../LibExtractor/bin/Release/LibExtractor.dll
LIBEXTRACTOR_DLL_MDB=
MUSICBRAINZ_DLL_SOURCE=../MusicBrainz/bin/Release/MusicBrainz.dll
MUSICBRAINZ_DLL_MDB=
VOLUMEDB_DLL_MDB=

endif

ifeq ($(CONFIG),GNOME_DEBUG)
ASSEMBLY_COMPILER_COMMAND = gmcs
ASSEMBLY_COMPILER_FLAGS =  -noconfig -codepage:utf8 -warn:3 -optimize- -debug "-define:DEBUG"
ASSEMBLY = bin/Debug/Basenji.exe
ASSEMBLY_MDB = $(ASSEMBLY).mdb
COMPILE_TARGET = winexe
PROJECT_REFERENCES =  \
	../Platform/bin/Debug/Platform.dll \
	../VolumeDB/bin/Debug/VolumeDB.dll
BUILD_DIR = bin/Debug

BASENJI_EXE_MDB_SOURCE=bin/Debug/Basenji.exe.mdb
BASENJI_EXE_MDB=$(BUILD_DIR)/Basenji.exe.mdb
LIBEXTRACTOR_DLL_CONFIG_SOURCE=LibExtractor.dll.config
BASENJI_EXE_CONFIG_SOURCE=Basenji.exe.config
PLATFORM_DLL_SOURCE=../Platform/bin/Debug/Platform.dll
PLATFORM_DLL_MDB_SOURCE=../Platform/bin/Debug/Platform.dll.mdb
PLATFORM_DLL_MDB=$(BUILD_DIR)/Platform.dll.mdb
VOLUMEDB_DLL_SOURCE=../VolumeDB/bin/Debug/VolumeDB.dll
PLATFORM_COMMON_DB_DLL_SOURCE=../Platform.Common.DB/bin/Debug/Platform.Common.DB.dll
PLATFORM_COMMON_DB_DLL_MDB_SOURCE=../Platform.Common.DB/bin/Debug/Platform.Common.DB.dll.mdb
PLATFORM_COMMON_DB_DLL_MDB=$(BUILD_DIR)/Platform.Common.DB.dll.mdb
LIBEXTRACTOR_DLL_SOURCE=../LibExtractor/bin/Debug/LibExtractor.dll
LIBEXTRACTOR_DLL_MDB_SOURCE=../LibExtractor/bin/Debug/LibExtractor.dll.mdb
LIBEXTRACTOR_DLL_MDB=$(BUILD_DIR)/LibExtractor.dll.mdb
MUSICBRAINZ_DLL_SOURCE=../MusicBrainz/bin/Debug/MusicBrainz.dll
MUSICBRAINZ_DLL_MDB_SOURCE=../MusicBrainz/bin/Debug/MusicBrainz.dll.mdb
MUSICBRAINZ_DLL_MDB=$(BUILD_DIR)/MusicBrainz.dll.mdb
VOLUMEDB_DLL_MDB_SOURCE=../VolumeDB/bin/Debug/VolumeDB.dll.mdb
VOLUMEDB_DLL_MDB=$(BUILD_DIR)/VolumeDB.dll.mdb

endif

ifeq ($(CONFIG),GNOME_RELEASE)
ASSEMBLY_COMPILER_COMMAND = gmcs
ASSEMBLY_COMPILER_FLAGS =  -noconfig -codepage:utf8 -warn:3 -optimize+
ASSEMBLY = bin/Release/Basenji.exe
ASSEMBLY_MDB = 
COMPILE_TARGET = winexe
PROJECT_REFERENCES =  \
	../Platform/bin/Release/Platform.dll \
	../VolumeDB/bin/Release/VolumeDB.dll
BUILD_DIR = bin/Release

BASENJI_EXE_MDB=
LIBEXTRACTOR_DLL_CONFIG_SOURCE=LibExtractor.dll.config
BASENJI_EXE_CONFIG_SOURCE=Basenji.exe.config
PLATFORM_DLL_SOURCE=../Platform/bin/Release/Platform.dll
PLATFORM_DLL_MDB=
VOLUMEDB_DLL_SOURCE=../VolumeDB/bin/Release/VolumeDB.dll
PLATFORM_COMMON_DB_DLL_SOURCE=../Platform.Common.DB/bin/Release/Platform.Common.DB.dll
PLATFORM_COMMON_DB_DLL_MDB=
LIBEXTRACTOR_DLL_SOURCE=../LibExtractor/bin/Release/LibExtractor.dll
LIBEXTRACTOR_DLL_MDB=
MUSICBRAINZ_DLL_SOURCE=../MusicBrainz/bin/Release/MusicBrainz.dll
MUSICBRAINZ_DLL_MDB=
VOLUMEDB_DLL_MDB=

endif

AL=al2
SATELLITE_ASSEMBLY_NAME=$(notdir $(basename $(ASSEMBLY))).resources.dll

PROGRAMFILES = \
	$(BASENJI_EXE_MDB) \
	$(LIBEXTRACTOR_DLL_CONFIG) \
	$(BASENJI_EXE_CONFIG) \
	$(PLATFORM_DLL) \
	$(PLATFORM_DLL_MDB) \
	$(VOLUMEDB_DLL) \
	$(PLATFORM_COMMON_DB_DLL) \
	$(PLATFORM_COMMON_DB_DLL_MDB) \
	$(LIBEXTRACTOR_DLL) \
	$(LIBEXTRACTOR_DLL_MDB) \
	$(MUSICBRAINZ_DLL) \
	$(MUSICBRAINZ_DLL_MDB) \
	$(VOLUMEDB_DLL_MDB)  

LINUX_DESKTOPAPPLICATIONS = \
	$(BASENJI_DESKTOP)  

BINARIES = \
	$(BASENJI)  


RESGEN=resgen2

BASENJI_DESKTOP = $(BUILD_DIR)/basenji.desktop
BASENJI = $(BUILD_DIR)/basenji
LIBEXTRACTOR_DLL_CONFIG = $(BUILD_DIR)/LibExtractor.dll.config
BASENJI_EXE_CONFIG = $(BUILD_DIR)/Basenji.exe.config
PLATFORM_DLL = $(BUILD_DIR)/Platform.dll
VOLUMEDB_DLL = $(BUILD_DIR)/VolumeDB.dll
PLATFORM_COMMON_DB_DLL = $(BUILD_DIR)/Platform.Common.DB.dll
LIBEXTRACTOR_DLL = $(BUILD_DIR)/LibExtractor.dll
MUSICBRAINZ_DLL = $(BUILD_DIR)/MusicBrainz.dll

FILES = \
	src/Gui/About.cs \
	src/Gui/DBProperties.cs \
	src/Gui/DriveSelection.cs \
	src/Gui/Events.cs \
	src/Gui/ItemSearch.cs \
	src/Gui/MainWindow.cs \
	src/Gui/Preferences.cs \
	src/Gui/VolumeProperties.cs \
	src/Gui/VolumeScanner.cs \
	src/Gui/Base/BinBase.cs \
	src/Gui/Base/DialogBase.cs \
	src/Gui/Base/ViewBase.cs \
	src/Gui/Base/WindowBase.cs \
	src/Gui/Widgets/DateChooser.cs \
	src/Gui/Widgets/ItemInfo.cs \
	src/Gui/Widgets/ItemView.cs \
	src/Gui/Widgets/Led.cs \
	src/Gui/Widgets/SearchResultView.cs \
	src/Gui/Widgets/VolumeView.cs \
	src/Icons/CustomIconTheme.cs \
	src/Icons/Icon.cs \
	src/Icons/IconCache.cs \
	src/Icons/IconUtils.cs \
	src/Icons/ItemIcons.cs \
	src/Icons/MimeIconCache.cs \
	src/Icons/NameInCustomIconThemeAttribute.cs \
	src/App.cs \
	src/AssemblyInfo.cs \
	src/PathUtil.cs \
	src/FileDialog.cs \
	src/Main.cs \
	src/MsgDialog.cs \
	src/Settings.cs \
	src/Util.cs \
	src/S.cs \
	src/Gui/Widgets/CategoryView.cs \
	src/Gui/Widgets/PageNavigation.cs \
	src/Gui/Widgets/PageNavigationEvents.cs \
	src/Gui/Widgets/IconEntry.cs \
	src/Gui/Widgets/SearchEntry.cs \
	src/Gui/Widgets/ItemPreview.cs \
	src/Gui/Import.cs \
	src/Icons/CustomIconThemeMimeMapping.cs \
	src/MimeCategoryMapping.cs \
	src/Gui/ItemProperties.cs \
	src/Gui/ObjectProperties.cs \
	src/Gui/Widgets/Editors/AudioCdVolumeEditor.cs \
	src/Gui/Widgets/Editors/AudioTrackItemEditor.cs \
	src/Gui/Widgets/Editors/FileSystemItemEditor.cs \
	src/Gui/Widgets/Editors/FileSystemVolumeEditor.cs \
	src/Gui/Widgets/Editors/ItemEditor.cs \
	src/Gui/Widgets/Editors/ObjectEditor.cs \
	src/Gui/Widgets/Editors/ObjectEditorEvents.cs \
	src/Gui/Widgets/Editors/ObjectEditorExceptions.cs \
	src/Gui/Widgets/Editors/VolumeEditor.cs \
	src/Gui/Widgets/Editors/FileItemEditor.cs \
	src/Gui/Widgets/Editors/DirectoryItemEditor.cs \
	src/Gui/Widgets/Sorting.cs \
	src/Options.cs \
	src/Global.cs 

DATA_FILES = 

RESOURCES = \
	images/LED_Off.png,Basenji.images.LED_Off.png \
	images/LED_On.png,Basenji.images.LED_On.png \
	po/de.resources,Basenji.po.de.resources \
	po/he.resources,Basenji.po.he.resources \
	po/da.resources,Basenji.po.da.resources \
	po/es.resources,Basenji.po.es.resources \
	po/fr.resources,Basenji.po.fr.resources \
	po/ru.resources,Basenji.po.ru.resources \
	po/bg.resources,Basenji.po.bg.resources \
	po/it.resources,Basenji.po.it.resources \
	po/oc.resources,Basenji.po.oc.resources \
	po/pt_BR.resources,Basenji.po.pt_BR.resources \
	po/tr.resources,Basenji.po.tr.resources \
	images/calendar.png,Basenji.images.calendar.png \
	po/pl.resources,Basenji.po.pl.resources \
	po/hu.resources,Basenji.po.hu.resources \
	po/et.resources,Basenji.po.et.resources \
	po/uk.resources,Basenji.po.uk.resources \
	po/zh_CN.resources,Basenji.po.zh_CN.resources \
	po/sr.resources,Basenji.po.sr.resources \
	po/hr.resources,Basenji.po.hr.resources \
	po/nl.resources,Basenji.po.nl.resources \
	po/cs.resources,Basenji.po.cs.resources 

EXTRAS = \
	app.desktop \
	basenji \
	LibExtractor.dll.config \
	Basenji.exe.config \
	src/App.cs.in \
	basenji.desktop.in \
	basenji.in 

REFERENCES =  \
	System \
	-pkg:gtk-sharp-2.0 \
	-pkg:glib-sharp-2.0 \
	Mono.Cairo \
	System.Core

DLL_REFERENCES = 

CLEANFILES = $(PROGRAMFILES) $(LINUX_DESKTOPAPPLICATIONS) $(BINARIES) 

#Targets
all: $(ASSEMBLY) $(PROGRAMFILES) $(LINUX_DESKTOPAPPLICATIONS) $(BINARIES)  $(top_srcdir)/config.make

include $(top_srcdir)/Makefile.include
include $(srcdir)/custom-hooks.make



$(eval $(call emit-deploy-wrapper,BASENJI_DESKTOP,basenji.desktop))
$(eval $(call emit-deploy-wrapper,BASENJI,basenji))
$(eval $(call emit-deploy-target,LIBEXTRACTOR_DLL_CONFIG))
$(eval $(call emit-deploy-target,BASENJI_EXE_CONFIG))
$(eval $(call emit-deploy-target,PLATFORM_DLL))
$(eval $(call emit-deploy-target,PLATFORM_DLL_MDB))
$(eval $(call emit-deploy-target,VOLUMEDB_DLL))
$(eval $(call emit-deploy-target,PLATFORM_COMMON_DB_DLL))
$(eval $(call emit-deploy-target,PLATFORM_COMMON_DB_DLL_MDB))
$(eval $(call emit-deploy-target,LIBEXTRACTOR_DLL))
$(eval $(call emit-deploy-target,LIBEXTRACTOR_DLL_MDB))
$(eval $(call emit-deploy-target,MUSICBRAINZ_DLL))
$(eval $(call emit-deploy-target,MUSICBRAINZ_DLL_MDB))
$(eval $(call emit-deploy-target,VOLUMEDB_DLL_MDB))


$(eval $(call emit_resgen_targets))
$(build_xamlg_list): %.xaml.g.cs: %.xaml
	xamlg '$<'

# Targets for Custom commands
DEBUG_AfterBuild:
	(cd $(srcdir) && ./custom_build_commands.sh --after-build $(BUILD_DIR))

DEBUG_AfterClean:
	(cd $(srcdir) && ./custom_build_commands.sh --after-clean $(BUILD_DIR))

RELEASE_AfterBuild:
	(cd $(srcdir) && ./custom_build_commands.sh --after-build $(BUILD_DIR))

RELEASE_AfterClean:
	(cd $(srcdir) && ./custom_build_commands.sh --after-clean $(BUILD_DIR))

GNOME_DEBUG_AfterBuild:
	(cd $(srcdir) && ./custom_build_commands.sh --after-build $(BUILD_DIR))

GNOME_DEBUG_AfterClean:
	(cd $(srcdir) && ./custom_build_commands.sh --after-clean $(BUILD_DIR))

GNOME_RELEASE_AfterBuild:
	(cd $(srcdir) && ./custom_build_commands.sh --after-build $(BUILD_DIR))

GNOME_RELEASE_AfterClean:
	(cd $(srcdir) && ./custom_build_commands.sh --after-clean $(BUILD_DIR))


$(ASSEMBLY_MDB): $(ASSEMBLY)
$(ASSEMBLY): $(build_sources) $(build_resources) $(build_datafiles) $(DLL_REFERENCES) $(PROJECT_REFERENCES) $(build_xamlg_list) $(build_satellite_assembly_list)
	make pre-all-local-hook prefix=$(prefix)
	mkdir -p $(shell dirname $(ASSEMBLY))
	make $(CONFIG)_BeforeBuild
	$(ASSEMBLY_COMPILER_COMMAND) $(ASSEMBLY_COMPILER_FLAGS) -out:$(ASSEMBLY) -target:$(COMPILE_TARGET) $(build_sources_embed) $(build_resources_embed) $(build_references_ref)
	make $(CONFIG)_AfterBuild
	make post-all-local-hook prefix=$(prefix)

install-local: $(ASSEMBLY) $(ASSEMBLY_MDB)
	make pre-install-local-hook prefix=$(prefix)
	make install-satellite-assemblies prefix=$(prefix)
	mkdir -p '$(DESTDIR)$(libdir)/$(PACKAGE)'
	$(call cp,$(ASSEMBLY),$(DESTDIR)$(libdir)/$(PACKAGE))
	$(call cp,$(ASSEMBLY_MDB),$(DESTDIR)$(libdir)/$(PACKAGE))
	$(call cp,$(BASENJI_EXE_MDB),$(DESTDIR)$(libdir)/$(PACKAGE))
	mkdir -p '$(DESTDIR)$(datadir)/applications'
	$(call cp,$(BASENJI_DESKTOP),$(DESTDIR)$(datadir)/applications)
	mkdir -p '$(DESTDIR)$(bindir)'
	$(call cp,$(BASENJI),$(DESTDIR)$(bindir))
	$(call cp,$(LIBEXTRACTOR_DLL_CONFIG),$(DESTDIR)$(libdir)/$(PACKAGE))
	$(call cp,$(BASENJI_EXE_CONFIG),$(DESTDIR)$(libdir)/$(PACKAGE))
	$(call cp,$(PLATFORM_DLL),$(DESTDIR)$(libdir)/$(PACKAGE))
	$(call cp,$(PLATFORM_DLL_MDB),$(DESTDIR)$(libdir)/$(PACKAGE))
	$(call cp,$(VOLUMEDB_DLL),$(DESTDIR)$(libdir)/$(PACKAGE))
	$(call cp,$(PLATFORM_COMMON_DB_DLL),$(DESTDIR)$(libdir)/$(PACKAGE))
	$(call cp,$(PLATFORM_COMMON_DB_DLL_MDB),$(DESTDIR)$(libdir)/$(PACKAGE))
	$(call cp,$(LIBEXTRACTOR_DLL),$(DESTDIR)$(libdir)/$(PACKAGE))
	$(call cp,$(LIBEXTRACTOR_DLL_MDB),$(DESTDIR)$(libdir)/$(PACKAGE))
	$(call cp,$(MUSICBRAINZ_DLL),$(DESTDIR)$(libdir)/$(PACKAGE))
	$(call cp,$(MUSICBRAINZ_DLL_MDB),$(DESTDIR)$(libdir)/$(PACKAGE))
	$(call cp,$(VOLUMEDB_DLL_MDB),$(DESTDIR)$(libdir)/$(PACKAGE))
	make post-install-local-hook prefix=$(prefix)

uninstall-local: $(ASSEMBLY) $(ASSEMBLY_MDB)
	make pre-uninstall-local-hook prefix=$(prefix)
	make uninstall-satellite-assemblies prefix=$(prefix)
	$(call rm,$(ASSEMBLY),$(DESTDIR)$(libdir)/$(PACKAGE))
	$(call rm,$(ASSEMBLY_MDB),$(DESTDIR)$(libdir)/$(PACKAGE))
	$(call rm,$(BASENJI_EXE_MDB),$(DESTDIR)$(libdir)/$(PACKAGE))
	$(call rm,$(BASENJI_DESKTOP),$(DESTDIR)$(datadir)/applications)
	$(call rm,$(BASENJI),$(DESTDIR)$(bindir))
	$(call rm,$(LIBEXTRACTOR_DLL_CONFIG),$(DESTDIR)$(libdir)/$(PACKAGE))
	$(call rm,$(BASENJI_EXE_CONFIG),$(DESTDIR)$(libdir)/$(PACKAGE))
	$(call rm,$(PLATFORM_DLL),$(DESTDIR)$(libdir)/$(PACKAGE))
	$(call rm,$(PLATFORM_DLL_MDB),$(DESTDIR)$(libdir)/$(PACKAGE))
	$(call rm,$(VOLUMEDB_DLL),$(DESTDIR)$(libdir)/$(PACKAGE))
	$(call rm,$(PLATFORM_COMMON_DB_DLL),$(DESTDIR)$(libdir)/$(PACKAGE))
	$(call rm,$(PLATFORM_COMMON_DB_DLL_MDB),$(DESTDIR)$(libdir)/$(PACKAGE))
	$(call rm,$(LIBEXTRACTOR_DLL),$(DESTDIR)$(libdir)/$(PACKAGE))
	$(call rm,$(LIBEXTRACTOR_DLL_MDB),$(DESTDIR)$(libdir)/$(PACKAGE))
	$(call rm,$(MUSICBRAINZ_DLL),$(DESTDIR)$(libdir)/$(PACKAGE))
	$(call rm,$(MUSICBRAINZ_DLL_MDB),$(DESTDIR)$(libdir)/$(PACKAGE))
	$(call rm,$(VOLUMEDB_DLL_MDB),$(DESTDIR)$(libdir)/$(PACKAGE))
	make post-uninstall-local-hook prefix=$(prefix)

install: install-local
uninstall: uninstall-local
clean: clean-local

include $(top_srcdir)/rules.make
