AUTOMAKE_OPTIONS = -Wno-portability

all: uicsharp.exe

uicsharp.exe: $(wildcard *.cs)
	csant -D$(CSC_NAME)=$(CSC) -C $(CSC_NAME)
	chmod 0755 $@

clean:
	-rm uicsharp.exe

distclean: clean

install: uicsharp.exe
	-$(MAKE) uninstall
	-mkdir $(bindir)
	install -o root -g root -m 0755 uicsharp.exe $(bindir)/uicsharp.exe
	ln -s $(bindir)/uicsharp.exe $(bindir)/uicsharp

uninstall:
	-rm -rf $(bindir)/uicsharp.exe $(bindir)/uicsharp

.PHONY: all clean install uninstall
