AUTOMAKE_OPTIONS = -Wno-portability

all: Qt.dll

TQWidget.cs:
	$(CLI) ../generator/generator.exe -f ../api/qt.xml -d .

Qt.dll: TQWidget.cs $(wildcard *.cs) $(wildcard static/*.cs)
	cp static/*.cs .
	csant -D$(CSC_NAME)=$(CSC) -C $(CSC_NAME)

clean:
	-rm Qt.dll

distclean: clean
	-rm *.cs

install:
	if ! test -d $(DESTDIR)$(libdir); then $(INSTALL) -d -m 0755 $(DESTDIR)$(libdir); fi
	$(INSTALL) -m 0644 Qt.dll $(DESTDIR)$(libdir)

uninstall:
	rm -rf $(libdir)/Qt.dll

.PHONY: all clean distclean install uninstall
