]> git.sesse.net Git - cubemap/blobdiff - Makefile
Make the HTTP inputs time out after 30 seconds of no activity.
[cubemap] / Makefile
index 3552fe44bad0a63d4f52f09eeb2ddc7d56884f69..828c9fda601ca734cc6ee2b39e1054ec4f916884 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -3,7 +3,7 @@ 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
 
@@ -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,9 +25,9 @@ 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
        $(INSTALL) -m 755 -o root -g root cubemap $(DESTDIR)$(PREFIX)/bin/cubemap
        sed \
                -e 's,cubemap\.stats,/var/lib/cubemap/\0,g' \
@@ -37,6 +37,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: