Makefile.am 3.93 KB
Newer Older
aymeric's avatar
aymeric committed
1 2 3
## Process this file with automake to produce Makefile.in

# let make re-run automake upon need
4
ACLOCAL_AMFLAGS = -I m4 -I/opt/local/share/aclocal
aymeric's avatar
aymeric committed
5 6 7 8 9 10 11

if EXTERNAL_ORTP
ORTP_DIR =
else
ORTP_DIR = oRTP
endif

smorlat's avatar
smorlat committed
12 13
SUBDIRS = m4 pixmaps po $(ORTP_DIR) mediastreamer2\
		coreapi console gtk-glade share scripts
aymeric's avatar
aymeric committed
14 15


simorl's avatar
simorl committed
16 17 18 19 20 21 22 23 24 25

ACLOCAL_FLAGS=-I$(top_srcdir)/m4


INSTALLDIR=$(shell cd $(top_builddir) && pwd)/linphone-install
INSTALLDIR_WITH_PREFIX=$(INSTALLDIR)/$(prefix)
ZIPFILE=$(shell cd $(top_builddir) && pwd)/$(PACKAGE)-win32-$(VERSION).zip
ZIP_EXCLUDED=include lib \
		share/sounds/linphone/rings/synth.wav \
		share/sounds/linphone/rings/tapping.wav \
26 27 28
		share/sounds/linphone/rings/orig.wav \
		share/sounds/linphone/rings/sweet.wav \
		share/sounds/linphone/rings/rock.wav
simorl's avatar
simorl committed
29

30 31

GTK_PREFIX=/usr
simorl's avatar
simorl committed
32 33 34 35 36 37 38 39 40 41
GTK_FILELIST=gtk+-2.16.2.filelist
GTK_FILELIST_PATH=$(shell cd $(top_srcdir) && pwd)/$(GTK_FILELIST)
LINPHONEDEPS_FILELIST=linphone-deps.filelist
WINBINDIST_FILES=$(shell cat $(top_srcdir)/$(LINPHONEDEPS_FILELIST))
ISS_SCRIPT=linphone.iss
ISS_SCRIPT_PATH=$(shell cd $(top_srcdir) && pwd)/$(ISS_SCRIPT)
#path to Inno Setup 5 compiler
ISCC=/c/Program\ Files/Inno\ Setup\ 5/ISCC.exe
PACKAGE_WIN32_FILELIST=$(PACKAGE)-win32.filelist

smorlat's avatar
smorlat committed
42
EXTRA_DIST = config.rpath  BUGS linphone.kdevelop  linphone.kdevelop.filelist\
aymeric's avatar
aymeric committed
43 44 45 46
				intltool-extract.in	\
				intltool-merge.in	\
				intltool-update.in \
				README.arm \
simorl's avatar
cleanup  
simorl committed
47
				README.mingw \
aymeric's avatar
aymeric committed
48
				autogen.sh \
simorl's avatar
simorl committed
49 50 51 52 53
				linphone.spec.in \
				$(GTK_FILELIST) \
				gen-gtkfilelist.sh \
				$(LINPHONEDEPS_FILELIST) \
				$(ISS_SCRIPT).in
aymeric's avatar
aymeric committed
54

simorl's avatar
simorl committed
55
DISTCLEANFILES= intltool-extract intltool-merge intltool-update po/stamp-it po/.intltool-merge-cache $(ISS_SCRIPT) $(PACKAGE_WIN32_FILELIST)
56

aymeric's avatar
aymeric committed
57 58
# `make rpm'

smorlat's avatar
smorlat committed
59
all-local: linphone.spec linphone.iss
60

aymeric's avatar
aymeric committed
61 62 63 64 65 66 67 68 69 70 71 72 73
linphone.spec: linphone.spec.in

.phony: rpm
rpm:
	$(MAKE) dist
# Create "Specfile" at the same level as the tarball content
	-rm -f $(PACKAGE)-$(VERSION).tar
	gunzip $(PACKAGE)-$(VERSION).tar.gz
	cp $(PACKAGE).spec Specfile
	tar --append --file=$(PACKAGE)-$(VERSION).tar Specfile
	gzip $(PACKAGE)-$(VERSION).tar
# <https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=2068410>
	TAR_OPTIONS=--wildcards rpmbuild -ta --clean --rmsource --rmspec $(PACKAGE)-$(VERSION).tar.gz
74 75 76

#a zip containing win32 binaries, suitable to generate an installer

simorl's avatar
simorl committed
77 78 79 80 81 82 83 84
other-cherrypick:
	cd $(GTK_PREFIX) && \
	for file in $(WINBINDIST_FILES) ; do \
		if test -d $$file; then \
			mkdir -p $(INSTALLDIR_WITH_PREFIX)/$$file ;\
		else \
			cp $$file $(INSTALLDIR_WITH_PREFIX)/$$file ;\
		fi \
85 86 87
	done
	cp /mingw/bin/libgcc_s*.dll $(INSTALLDIR_WITH_PREFIX)/bin/.

88

simorl's avatar
simorl committed
89 90 91 92 93 94 95 96 97 98
gtk-cherrypick:
	cd $(GTK_PREFIX) && \
	for file in `cat $(GTK_FILELIST_PATH)` ; do \
		if test -d $$file; then \
			mkdir -p $(INSTALLDIR_WITH_PREFIX)/$$file ;\
		else \
			cp $$file $(INSTALLDIR_WITH_PREFIX)/$$file ;\
		fi \
	done && \
	cp -rf share/themes $(INSTALLDIR_WITH_PREFIX)/share/.
99 100 101 102 103 104

zip:
	rm -f $(ZIPFILE)
	rm -rf $(INSTALLDIR)
	mkdir -p $(INSTALLDIR)
	make install DESTDIR=$(INSTALLDIR)
simorl's avatar
simorl committed
105 106 107 108 109 110 111 112 113 114
#remove unwanted linphone stuff
	cd $(INSTALLDIR_WITH_PREFIX) && rm -rf $(ZIP_EXCLUDED)
#add gtk dlls and files
	make gtk-cherrypick
	make other-cherrypick
	cp -f $(top_srcdir)/gtk-glade/gtkrc $(INSTALLDIR_WITH_PREFIX)/.
	cp -f $(top_srcdir)/README $(INSTALLDIR_WITH_PREFIX)/.
	cp -f $(top_srcdir)/COPYING $(INSTALLDIR_WITH_PREFIX)/.
	cd $(INSTALLDIR_WITH_PREFIX) && zip -r $(ZIPFILE) *

115
filelist: zip
simorl's avatar
simorl committed
116 117 118 119 120 121 122 123
	cd $(INSTALLDIR_WITH_PREFIX) && \
	rm -f $(PACKAGE_WIN32_FILELIST) && \
	for file in `find` ; do \
		if ! test -d $$file ; then \
			echo "Source: $$file; Destdir: {app}\\`dirname $$file`; Flags: ignoreversion" \
			>> $(PACKAGE_WIN32_FILELIST) ;\
		fi \
	done
124 125

setup.exe: filelist
simorl's avatar
simorl committed
126 127 128 129 130 131 132 133
	cp $(ISS_SCRIPT) $(INSTALLDIR_WITH_PREFIX)/.
	cd $(INSTALLDIR_WITH_PREFIX) && \
	$(ISCC) $(ISS_SCRIPT) 
	mv $(INSTALLDIR_WITH_PREFIX)/Output/setup.exe $(PACKAGE)-$(VERSION)-setup.exe
	rm -rf $(INSTALLDIR_WITH_PREFIX)/Output
	rm -f $(INSTALLDIR_WITH_PREFIX)/$(PACKAGE_WIN32_FILELIST)
	rm -f $(INSTALLDIR_WITH_PREFIX)/$(ISS_SCRIPT)

134 135 136
newdate:
	cd gtk-glade && $(MAKE) newdate

137

smorlat's avatar
smorlat committed
138 139