X-Git-Url: https://git.sesse.net/?p=cubemap;a=blobdiff_plain;f=Makefile;h=d426bc1bae2469f08b367a39965edbecce05b4f5;hp=40ae397705fdc9f932368669fe754a71f33e6278;hb=683141e8898415ba949161971b0c7f5508c92d14;hpb=f2530dbb8415f9e7cc0f2d4b45741120c95e8a05 diff --git a/Makefile b/Makefile index 40ae397..d426bc1 100644 --- a/Makefile +++ b/Makefile @@ -2,10 +2,10 @@ CC=gcc CXX=g++ INSTALL=install PROTOC=protoc -CXXFLAGS=-Wall -O2 -g -pthread +CXXFLAGS=-Wall -O2 -g -pthread $(shell getconf LFS_CFLAGS) LDLIBS=-lprotobuf -pthread -lrt -OBJS=main.o client.o server.o stream.o udpstream.o serverpool.o mutexlock.o input.o input_stats.o httpinput.o udpinput.o parse.o config.o markpool.o acceptor.o stats.o accesslog.o thread.o util.o log.o metacube2.o sa_compare.o state.pb.o +OBJS=main.o client.o server.o stream.o udpstream.o serverpool.o mutexlock.o input.o input_stats.o httpinput.o udpinput.o parse.o config.o acceptor.o stats.o accesslog.o thread.o util.o log.o metacube2.o sa_compare.o state.pb.o all: cubemap @@ -39,6 +39,13 @@ install: $(DESTDIR)$(PREFIX)/lib/systemd/system $(INSTALL) -m 755 -o root -g root cubemap $(DESTDIR)$(PREFIX)/bin/cubemap $(INSTALL) -m 755 -o root -g root munin/cubemap munin/cubemap_input $(DESTDIR)$(PREFIX)/share/munin/plugins/ + gzip -c cubemap.1 > $(DESTDIR)$(PREFIX)/share/man/man1/cubemap.1.gz + sed \ + -e "s,@prefix@,$(PREFIX),g" \ + -e "s,@sysconfdir@,$(SYSCONFDIR),g" \ + cubemap.service.in > $(DESTDIR)$(PREFIX)/lib/systemd/system/cubemap.service + # Make sure we don't overwrite an existing configuration. + test ! -f $(DESTDIR)$(SYSCONFDIR)/cubemap.config sed \ -e "s,cubemap\.stats,$(LOCALSTATEDIR)/lib/cubemap/\0,g" \ -e "s,cubemap-input\.stats,$(LOCALSTATEDIR)/lib/cubemap/\0,g" \ @@ -47,11 +54,6 @@ install: -e 's,^stream,#\0,g' \ -e 's,^udpstream,#\0,g' \ cubemap.config.sample > $(DESTDIR)$(SYSCONFDIR)/cubemap.config - gzip -c cubemap.1 > $(DESTDIR)$(PREFIX)/share/man/man1/cubemap.1.gz - sed \ - -e "s,@prefix@,$(PREFIX),g" \ - -e "s,@sysconfdir@,$(SYSCONFDIR),g" \ - cubemap.service.in > $(DESTDIR)$(PREFIX)/lib/systemd/system/cubemap.service .PHONY: clean install .SUFFIXES: