Makefile.am 2.3 KB
Newer Older
aymeric's avatar
aymeric committed
1 2
# linphone/oRTP/Makefile.am -- 

Yann Diorcet's avatar
Yann Diorcet committed
3
ACLOCAL_AMFLAGS = -I m4 $(ACLOCAL_MACOS_FLAGS)
4

Guillaume Beraudo's avatar
Guillaume Beraudo committed
5
EXTRA_DIST = oRTP.prj ortp-config.h.in TODO pkg.list autogen.sh ortp.pc.in ortp.spec.in ortp.spec ortp.doxygen oRTP.pws
aymeric's avatar
aymeric committed
6

Yann Diorcet's avatar
Yann Diorcet committed
7 8 9
SUBDIRS=src build m4 include

ACLOCAL_FLAGS=-I$(top_srcdir)/m4
aymeric's avatar
aymeric committed
10 11 12 13

pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = ortp.pc

smorlat's avatar
smorlat committed
14
SOURCES=$(top_srcdir)/include/ortp/*.h $(top_srcdir)/src/*.c $(top_srcdir)/src/*.h
aymeric's avatar
aymeric committed
15

16 17
CLEANFILES=

aymeric's avatar
aymeric committed
18 19 20
#html doc
if HAVE_DOXYGEN

Yann Diorcet's avatar
Yann Diorcet committed
21
# docdir & pkgdocdir are not always defined by automake
aymeric's avatar
aymeric committed
22 23 24 25 26 27
pkgdocdir=$(docdir)/$(PACKAGE)-$(VERSION)
doc_htmldir=$(pkgdocdir)/html

doc_html_DATA = $(top_builddir)/doc/html/html.tar

$(doc_html_DATA): $(top_builddir)/doc/html/index.html
Yann Diorcet's avatar
Yann Diorcet committed
28
	cd $(top_builddir)/doc/html/ && tar cf html.tar *
aymeric's avatar
aymeric committed
29 30 31 32 33 34 35 36 37

$(top_builddir)/doc/html/index.html: $(SOURCES) ortp.doxygen Makefile.am
	rm -rf doc
	$(DOXYGEN) ortp.doxygen

install-data-hook:
	cd $(DESTDIR)$(doc_htmldir) && tar xf html.tar && rm -f html.tar

uninstall-hook:
smorlat's avatar
smorlat committed
38
	cd $(DESTDIR)$(doc_htmldir) && rm -f *
aymeric's avatar
aymeric committed
39

40

aymeric's avatar
aymeric committed
41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59
endif

## oRTP packaging methods:

# `make rpm'

.phony: rpm

rpm:
	$(MAKE) dist
# <https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=206841>
	TAR_OPTIONS=--wildcards rpmbuild -ta --clean --rmsource --rmspec $(PACKAGE)-$(VERSION).tar.gz

# `make package'

if WITH_EPM

.PHONY: package

Yann Diorcet's avatar
Yann Diorcet committed
60 61
PKG_NAME=$(PACKAGE)-$(VERSION)-$(RELEASE)
BUILDROOT=`pwd`/epm-install
aymeric's avatar
aymeric committed
62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90

package: $(srcdir)/pkg.list $(srcdir)/configure
	-rm -rf pkg $(BUILDROOT) $(PKG_NAME).*
	$(MAKE) install DESTDIR=$(BUILDROOT)
	$(MKEPMLIST) -u $(SYS_USER) -g $(SYS_GROUP) --prefix $(prefix) \
		$(BUILDROOT)/$(prefix) > files.list
	$(EPM) -vv -f native -g -n -a $(ARCH) --keep-files --output-dir pkg \
		srcdir=$(srcdir) \
		top_srcdir=$(top_srcdir) \
		top_builddir=$(top_builddir) \
		PACKAGE=$(PACKAGE) \
		SUMMARY="$(SUMMARY)" \
		VERSION=$(ORTP_PKGCONFIG_VERSION) \
		RELEASE=$(RELEASE) \
		LICENSE="$(LICENSE)" \
		VENDOR="$(VENDOR)" \
		PACKAGER="$(PACKAGER)" \
		$(PACKAGE) $(srcdir)/pkg.list
	mv -f pkg/$(PACKAGE)-$(ORTP_PKGCONFIG_VERSION)-$(RELEASE).$(EPM_PKG_EXT) $(PKG_NAME).$(ARCH).$(EPM_PKG_EXT)

clean-local:
	rm -rf pkg $(BUILDROOT)
	rm -f files.list
	rm -rf doc

endif WITH_EPM

distclean-local:
	-rm -f ortp.defs
91
	-rm -rf doc/html
aymeric's avatar
aymeric committed
92 93 94 95 96

all-local: ortp.spec

ortp.spec: ortp.spec.in

Guillaume Beraudo's avatar
Guillaume Beraudo committed
97 98 99 100 101

deb:
	$(MAKE) dist
	mv $(distdir).tar.gz ../$(PACKAGE)_$(VERSION).orig.tar.gz
	dpkg-buildpackage -us -uc