Makefile (843B)
1 PJSIP_CFLAGS = `pkg-config --cflags libpjproject` 2 PJSIP_LDFLAGS = `pkg-config --libs libpjproject` 3 CPP = g++ 4 CFLAGS ?= -O5 5 LDFLAGS ?= -s 6 _CFLAGS = $(CFLAGS) $(PJSIP_CFLAGS) -std=c++11 7 _LDFLAGS = $(LDFLAGS) $(PJSIP_LDFLAGS) 8 INSTALL = install 9 PREFIX ?= /usr 10 MANPREFIX ?= /usr/share/man 11 12 .PHONY: all 13 14 all: siproc siproc-parameters 15 16 siproc: src/siproc.o 17 $(CPP) $(_CFLAGS) -o $@ $^ $(_LDFLAGS) 18 19 siproc-parameters: src/parameters.o 20 $(CPP) $(_CFLAGS) -o $@ $^ $(_LDFLAGS) 21 22 %.o: %.cpp 23 $(CPP) $(_CFLAGS) -c -o $@ $^ 24 25 .PHONY:install 26 27 install: siproc siproc-parameters 28 mkdir -p $(DESTDIR)$(PREFIX)/bin/ 29 $(INSTALL) -m 755 siproc $(DESTDIR)$(PREFIX)/bin/ 30 mkdir -p $(DESTDIR)$(PREFIX)/bin/ 31 $(INSTALL) -m 755 siproc-parameters $(DESTDIR)$(PREFIX)/bin/ 32 mkdir -p $(DESTDIR)$(MANPREFIX)/man1 33 $(INSTALL) -m 644 doc/siproc.1 $(DESTDIR)$(MANPREFIX)/man1