2013-10-02 11:16:42 +00:00
|
|
|
VERSION = 3.1.0
|
2009-10-17 19:47:06 +00:00
|
|
|
|
2014-06-11 12:41:49 +00:00
|
|
|
prefix = /usr/local
|
|
|
|
bindir = $(prefix)/bin
|
|
|
|
mandir = $(prefix)/share/man/man1
|
|
|
|
|
2014-06-12 15:24:12 +00:00
|
|
|
SEVENZIP = 7z a -mx=9 -bd
|
|
|
|
|
2013-10-02 11:24:57 +00:00
|
|
|
all: xasm xasm.html
|
2009-10-17 19:47:06 +00:00
|
|
|
|
2013-10-02 11:24:57 +00:00
|
|
|
xasm: xasm.d
|
2014-07-20 15:14:36 +00:00
|
|
|
dmd -of$@ -O -release $<
|
2009-10-17 19:47:06 +00:00
|
|
|
|
|
|
|
xasm.html: xasm.1.txt
|
2013-10-02 11:24:57 +00:00
|
|
|
asciidoc -o - $< | sed -e "s/527bbd;/20a0a0;/" >$@
|
2009-10-17 19:47:06 +00:00
|
|
|
|
2013-10-02 11:24:57 +00:00
|
|
|
xasm.1: xasm.1.txt
|
|
|
|
a2x -f manpage $<
|
|
|
|
|
2014-06-11 12:41:49 +00:00
|
|
|
install: xasm xasm.1
|
|
|
|
mkdir -p $(DESTDIR)$(bindir) && install xasm $(DESTDIR)$(bindir)/xasm
|
|
|
|
mkdir -p $(DESTDIR)$(mandir) && install -m 644 xasm.1 $(DESTDIR)$(mandir)/xasm.1
|
|
|
|
|
|
|
|
uninstall:
|
|
|
|
$(RM) $(DESTDIR)$(bindir)/xasm $(DESTDIR)$(mandir)/xasm.1
|
|
|
|
|
2014-06-12 19:19:11 +00:00
|
|
|
install-scite: xasm.properties
|
|
|
|
mkdir -p $(DESTDIR)$(prefix)/share/scite && install $< $(DESTDIR)$(prefix)/share/scite/xasm.properties
|
|
|
|
|
|
|
|
uninstall-scite:
|
|
|
|
$(RM) $(DESTDIR)$(prefix)/share/scite/xasm.properties
|
|
|
|
|
2014-06-12 15:24:12 +00:00
|
|
|
dist: srcdist ../xasm-$(VERSION)-windows.zip
|
|
|
|
|
|
|
|
srcdist: MANIFEST
|
|
|
|
$(RM) ../xasm-$(VERSION).tar.gz && tar -c --numeric-owner --owner=0 --group=0 --mode=644 -T MANIFEST --transform=s,,xasm-$(VERSION)/, | $(SEVENZIP) -tgzip -si ../xasm-$(VERSION).tar.gz
|
|
|
|
|
|
|
|
MANIFEST:
|
|
|
|
if test -e .git; then (git ls-files | grep -vF .gitignore && echo MANIFEST) | sort >$@ ; fi
|
|
|
|
|
|
|
|
../xasm-$(VERSION)-windows.zip: xasm xasm.html xasm.properties
|
|
|
|
$(RM) $@ && $(SEVENZIP) -tzip $@ xasm.exe xasm.html xasm.properties
|
|
|
|
|
2014-06-11 12:41:49 +00:00
|
|
|
deb:
|
|
|
|
debuild -b -us -uc
|
|
|
|
|
2014-07-20 15:14:36 +00:00
|
|
|
osx: ../xasm-$(VERSION)-osx.dmg
|
2014-06-10 11:50:42 +00:00
|
|
|
|
2014-06-12 15:24:12 +00:00
|
|
|
../xasm-$(VERSION)-osx.dmg: osx/xasm osx/bin
|
2014-06-10 11:50:42 +00:00
|
|
|
hdiutil create -volname xasm-$(VERSION)-osx -srcfolder osx -imagekey zlib-level=9 -ov $@
|
|
|
|
|
2014-07-20 15:14:36 +00:00
|
|
|
osx/xasm: xasm.d
|
2014-07-20 15:39:35 +00:00
|
|
|
mkdir -p osx && dmd -of$@ -O -release -m32 -L-macosx_version_min -L10.6 $< && rm -f osx/xasm.o
|
2014-06-10 11:50:42 +00:00
|
|
|
|
|
|
|
osx/bin:
|
|
|
|
mkdir -p osx && ln -s /usr/bin $@
|
|
|
|
|
2009-10-17 19:47:06 +00:00
|
|
|
clean:
|
2014-06-12 15:24:12 +00:00
|
|
|
$(RM) xasm xasm.exe xasm.obj xasm.html xasm.1
|
2014-06-10 11:50:42 +00:00
|
|
|
rm -rf osx
|
2013-10-02 11:16:42 +00:00
|
|
|
|
2014-06-12 19:19:11 +00:00
|
|
|
.PHONY: all install uninstall install-scite uninstall-scite dist srcdist MANIFEST deb osx clean
|
2009-10-17 19:47:06 +00:00
|
|
|
|
|
|
|
.DELETE_ON_ERROR:
|