
CSC_MONO=mcs
CSC_WINDOWS=csc

CSCFLAGS=/debug /unsafe

SOURCES_MONO=../BasicImagingInterface.cs ../GUIImage-Drawing.cs ../DrawingPrimitives.cs ../Autopano.cs
SOURCES_WIN=..\\BasicImagingInterface.cs ..\\GUIImage-Drawing.cs ..\\DrawingPrimitives.cs ..\\Autopano.cs

MAKE_WIN= windows=yes
LIBS_WIN=/r:gtk-sharp.dll /r:glade-sharp.dll /r:atk-sharp.dll \
	/r:gdk-sharp.dll /r:glib-sharp.dll /r:System.Drawing.dll
MAKE_MONO=
LIBS_MONO=/pkg:gtk-sharp /pkg:glade-sharp /resource:image-bottom-left.png \
	/resource:image-bottom-right.png /resource:image-vanilla.png \
	/r:System.Drawing.dll

LIBSIFT=/r:../../libsift.dll

ifeq ($(windows),yes)
	SOURCES=$(SOURCES_WIN)
	CSC=$(CSC_WINDOWS)
	LIBS += $(LIBS_WIN)
	MAKE_OPTIONS += $(MAKE_WIN)
else
	SOURCES=$(SOURCES_MONO)
	CSC=$(CSC_MONO)
	LIBS += $(LIBS_MONO)
	MAKE_OPTIONS += $(MAKE_MONO)
endif


all:	autopanog.exe

autopanog.exe:	autopanog.cs Makefile autopanog.glade
	$(CSC) $(CSCFLAGS) -out:autopanog.exe -main:Autopanog autopanog.cs \
		-resource:autopanog.glade \
		$(SOURCES) $(LIBS) $(LIBSIFT)

clean:
	rm -f *.exe

