-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathMakefile
46 lines (34 loc) · 1.06 KB
/
Makefile
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
package = liborxsrtp
version = 0.2
tarname = $(package)
distdir = $(tarname)-$(version)
MAJOR_VER=0
LIBDIR=/usr/lib64
all:liborxsrtp.so.${version}
dist: $(distdir).tar.gz
distclean:
-rm $(distdir).tar.gz
$(distdir).tar.gz: $(distdir)
tar chof - $(distdir) | gzip -9 -c > $@
rm -rf $(distdir)
$(distdir):
mkdir -p $(distdir)
cp srtp.c $(distdir)
cp srtp.h $(distdir)
cp Makefile $(distdir)
cp COPYING $(distdir)
clean:
-rm liborxsrtp.so.${version} $(distdir).tar.gz
srtp.o: srtp.c srtp.h Makefile
gcc -c -o srtp.o -fPIC -O2 -DUSE_PTHREAD -g srtp.c
liborxsrtp.so.${version}: srtp.o
gcc -shared -o liborxsrtp.so.${version} srtp.o -lgcrypt
install:
mkdir -p $(DESTDIR)$(LIBDIR)
mkdir -p $(DESTDIR)/usr/share/liborxsrtp
mkdir -p $(DESTDIR)/usr/include/srtp
install -m 0755 liborxsrtp.so.${version} $(DESTDIR)$(LIBDIR)/liborxsrtp.so.${version}
install -m 0644 COPYING $(DESTDIR)/usr/share/liborxsrtp/COPYING
install -m 0644 srtp.h $(DESTDIR)/usr/include/srtp/
ln -sf liborxsrtp.so.$(version) $(DESTDIR)$(LIBDIR)/liborxsrtp.so
.PHONY: all clean dist distclean