| 1 |
system := $(shell uname -s) |
| 2 |
qm4 := $(shell which qmake-qt4) |
| 3 |
qm := $(if $(qm4),$(qm4),qmake) |
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
VERSION="0.5" |
| 8 |
DISTRIB=FaustWorks-$(VERSION) |
| 9 |
TMPDIR=$(DISTRIB)-Distribution |
| 10 |
|
| 11 |
ifeq ($(system), Darwin) |
| 12 |
SPEC := -spec macx-g++ |
| 13 |
DST := "FaustWorks.app/Contents/" |
| 14 |
|
| 15 |
else |
| 16 |
SPEC := "" |
| 17 |
PREFIX := /usr |
| 18 |
endif |
| 19 |
|
| 20 |
|
| 21 |
all : Makefile_QT |
| 22 |
make -f Makefile_QT |
| 23 |
|
| 24 |
install : install-$(system) |
| 25 |
uninstall : uninstall-$(system) |
| 26 |
|
| 27 |
install-Linux : |
| 28 |
install FaustWorks $(PREFIX)/bin |
| 29 |
install faustworks.desktop $(PREFIX)/share/applications/ |
| 30 |
install Resources/faustworks.xpm $(PREFIX)/share/pixmaps/ |
| 31 |
install Resources/faustworks.png $(PREFIX)/share/icons/hicolor/32x32/apps/ |
| 32 |
install Resources/faustworks.svg $(PREFIX)/share/icons/hicolor/scalable/apps/ |
| 33 |
|
| 34 |
uninstall-Linux : |
| 35 |
rm -f $(PREFIX)/bin/FaustWorks |
| 36 |
rm -f $(PREFIX)/share/applications/faustworks.desktop |
| 37 |
rm -f $(PREFIX)/share/pixmaps/faustworks.xpm |
| 38 |
rm -f $(PREFIX)/share/icons/hicolor/32x32/apps/faustworks.png |
| 39 |
rm -f $(PREFIX)/share/icons/hicolor/scalable/apps/faustworks.svg |
| 40 |
|
| 41 |
install-Darwin : |
| 42 |
cp -r FaustWorks.app /Applications |
| 43 |
|
| 44 |
dmg : $(DISTRIB).dmg |
| 45 |
|
| 46 |
$(DISTRIB).dmg : all |
| 47 |
rm -rf $(TMPDIR) |
| 48 |
mkdir $(TMPDIR) |
| 49 |
cp -r FaustWorks.app $(TMPDIR) |
| 50 |
macdeployqt $(TMPDIR)/FaustWorks.app/ |
| 51 |
rm -rf $(DISTRIB).dmg |
| 52 |
hdiutil create $(DISTRIB).dmg -srcfolder $(TMPDIR) |
| 53 |
rm -rf $(TMPDIR) |
| 54 |
|
| 55 |
|
| 56 |
# make a FaustWorks distribution by cloning the git repository |
| 57 |
clonedist : |
| 58 |
git clone git://faudiostream.git.sourceforge.net/gitroot/faudiostream/FaustWorks FaustWorks-$(version) |
| 59 |
rm -rf FaustWorks-$(version)/.git |
| 60 |
rm -f FaustWorks-$(version).tar.gz |
| 61 |
tar czfv FaustWorks-$(version).tar.gz FaustWorks-$(version) |
| 62 |
rm -rf FaustWorks-$(version) |
| 63 |
|
| 64 |
|
| 65 |
# make a FaustWorks source distribution using git archive |
| 66 |
distribution : |
| 67 |
git archive -o $(DISTRIB).zip HEAD |
| 68 |
|
| 69 |
clean : Makefile_QT |
| 70 |
make -f Makefile_QT clean |
| 71 |
rm -f FaustWorks.pro.user |
| 72 |
rm -rf FaustWorks.app |
| 73 |
rm -f $(DISTRIB).dmg |
| 74 |
rm -f $(DISTRIB).zip |
| 75 |
|
| 76 |
Makefile_QT: |
| 77 |
$(qm) $(SPEC) -o Makefile_QT |
| 78 |
|
| 79 |
|
| 80 |
|
| 81 |
|