#
#
#
#    Makefile.cs
#
#    Make recipes for building with Mono.
#
#    License: GNU General Public License Version 3.0.
#    
#    Copyright (C) 2017 by Matthew K. Roberts, KK5JY. All rights reserved.
#
#    This program is free software: you can redistribute it and/or modify
#    it under the terms of the GNU General Public License as published by
#    the Free Software Foundation, either version 3 of the License, or
#    (at your option) any later version.
#    
#    This program is distributed in the hope that it will be useful, but
#    WITHOUT ANY WARRANTY; without even the implied warranty of
#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
#    General Public License for more details.
#    
#    You should have received a copy of the GNU General Public License
#    along with this program.  If not, see: http://www.gnu.org/licenses/
#    
#
#

# the compiler
MCS=mcs

# the installation folder (will put exe in $INSTALL_ROOT/bin, etc.)
INSTALL_ROOT=/usr/local

# the debug settings
DEBUG= -debug+ -define:DEBUG 

# the core files used for both the GUI and CLI versions
FILES=\
	../EndpointSMI/Helpers.cs \
	../EndpointSMI/EndpointSMI.cs \
	../EndpointSMI/SerialPortHelper.cs \
	../EndpointSMI/Interfaces.cs \
	../EndpointSMI/SocketHelper.cs \
	../SMI.Core/BreakIn.cs \
	../SMI.Core/CommonConfig.cs \
	../SMI.Core/Config.cs \
	../SMI.Core/Adif.cs \
	../SMI.Core/FlXml.cs \
	../SMI.Core/MacroExpansion.cs \
	MainWindow.cs \
	TerminalWindow.cs \
	MacroEditor.cs \
	FilteredEntry.cs \
	Program.cs \
	ConfigUtils.cs \
	MessageBox.cs \
	WidgetUtils.cs \
	SafeEntryUpdateArgs.cs \
	ConfigDialog.cs \
	SettingsDialog.cs

WINFORM_REFS=-reference:System.Numerics
# the application icon to show when browsing in Win32
WINICON=../SMI.ico

# target definitions
TARGETS=SMI.exe

all: $(TARGETS)

SMI.exe: $(RESOURCES) $(FILES)
	$(MCS) $(DEBUG) -out:$@ -sdk:4 -pkg:gtk-sharp-2.0 -target:winexe -win32icon:$(WINICON) $(FILES) $(REFS) $(WINFORM_REFS)
clean:
	rm -f *.exe *.mdb
rebuild: clean all
install:
	install -o root -g root -m 755 SMI.exe $(INSTALL_ROOT)/bin/

# EOF
