X-Git-Url: https://git.sesse.net/?p=cubemap;a=blobdiff_plain;f=Makefile;h=a0b5f50690300c299b499c63d978c01f9339fe84;hp=3552fe44bad0a63d4f52f09eeb2ddc7d56884f69;hb=db58dd9934afbb1fe93e6d6d408335f4ed35afab;hpb=7fc0fc6a973713c4082181aceb3c03d99ef3297f diff --git a/Makefile b/Makefile index 3552fe4..a0b5f50 100644 --- a/Makefile +++ b/Makefile @@ -3,9 +3,9 @@ CXX=g++ INSTALL=install PROTOC=protoc CXXFLAGS=-Wall -O2 -g -pthread -LDLIBS=-lprotobuf -pthread +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 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 markpool.o acceptor.o stats.o accesslog.o thread.o util.o log.o metacube2.o state.pb.o all: cubemap @@ -17,7 +17,7 @@ all: cubemap %.pb.o: %.pb.cc $(CXX) -MMD -MP $(CPPFLAGS) $(CXXFLAGS) -o $@ -c $< cubemap: $(OBJS) - $(CXX) -o cubemap $(OBJS) $(LDLIBS) + $(CXX) -o cubemap $(OBJS) $(LDLIBS) $(LDFLAGS) DEPS=$(OBJS:.o=.d) -include $(DEPS) @@ -25,10 +25,11 @@ DEPS=$(OBJS:.o=.d) clean: $(RM) cubemap $(OBJS) $(DEPS) state.pb.h state.pb.cc -PREFIX=/usr +PREFIX=/usr/local install: - $(INSTALL) -m 755 -o root -g root -d $(DESTDIR)$(PREFIX)/bin $(DESTDIR)/etc $(DESTDIR)/var/lib/cubemap $(DESTDIR)/var/log/cubemap + $(INSTALL) -m 755 -o root -g root -d $(DESTDIR)$(PREFIX)/bin $(DESTDIR)$(PREFIX)/share/man/man1 $(DESTDIR)/etc $(DESTDIR)/var/lib/cubemap $(DESTDIR)/var/log/cubemap $(DESTDIR)$(PREFIX)/share/munin/plugins $(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/ sed \ -e 's,cubemap\.stats,/var/lib/cubemap/\0,g' \ -e 's,cubemap-input\.stats,/var/lib/cubemap/\0,g' \ @@ -37,6 +38,7 @@ install: -e 's,^stream,#\0,g' \ -e 's,^udpstream,#\0,g' \ cubemap.config.sample > $(DESTDIR)/etc/cubemap.config + gzip -c cubemap.1 > $(DESTDIR)$(PREFIX)/share/man/man1/cubemap.1.gz .PHONY: clean install .SUFFIXES: