File: Makefile.win32

package info (click to toggle)
sailcut 1.2.4-1
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 3,580 kB
  • ctags: 875
  • sloc: cpp: 10,139; sh: 8,767; makefile: 176
file content (56 lines) | stat: -rw-r--r-- 1,793 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
##### Win32 distribution generation #####

MAKENSIS = makensis
UNIX2DOS = unix2dos
MINGW = i586-mingw32msvc
STRIP = $(MINGW)-strip
QTDIR=/usr/$(MINGW)/share/qt4

VERSION := $(shell cat configure.in | grep AM_INIT_AUTOMAKE | sed -e 's/.*,\([0-9a-zA-Z\.]*\).*/\1/')
BIN_DOCS = README COPYING ChangeLog

win32_configure= ../configure
win32_builddir = win32-build
win32_distdir = sailcut-$(VERSION)-win32
win32_icons = sailcut.ico sailcut-file.ico
win32_qtlibs = mingwm10.dll QtCore4.dll QtGui4.dll QtOpenGL4.dll QtXml4.dll
win32_nsi = sailcut.nsi

win32-dist: win32-zip win32-installer win32-clean

win32-build-stamp:
	mkdir -p $(win32_builddir)
	cd $(win32_builddir) && \
	  $(win32_configure) \
	    --host=$(MINGW) \
	    --with-qt-dir=$(QTDIR) \
	    --with-datadir=data \
	    --with-docdir=doc
	make -C $(win32_builddir)
	touch $@

win32-install-stamp: win32-build-stamp
	rm -rf $(win32_distdir)
	mkdir -p $(win32_distdir)
	for i in $(BIN_DOCS); do \
	  cp $$i $(win32_distdir); \
	  $(UNIX2DOS) $(win32_distdir)/$$i; \
	done
	make -C $(win32_builddir) DESTDIR=$(CURDIR)/$(win32_distdir)/ bindir=. pixmapsdir=icons install
	cp -f $(addprefix $(win32_builddir)/icons/,$(win32_icons)) $(win32_distdir)/icons
	$(STRIP) $(win32_distdir)/sailcut.exe
	cp -f $(addprefix $(QTDIR)/bin/,$(win32_qtlibs)) $(win32_distdir)

win32-installer: win32-install-stamp
	@echo; echo "## Building win32 installer ##"; echo
	cd $(win32_distdir) && $(MAKENSIS) -NOCD $(CURDIR)/$(win32_builddir)/$(win32_nsi)

win32-zip: win32-install-stamp
	@echo; echo "## Building win32 zip ##"; echo
	rm -f $(win32_distdir).zip
	zip -r $(win32_distdir).zip $(win32_distdir)

win32-clean:
	rm -rf $(win32_distdir) $(win32_builddir) win32-build-stamp win32-install-stamp

.PHONY: win32-dist win32-clean win32-zip win32-installer