X-Git-Url: https://git.sesse.net/?p=cubemap;a=blobdiff_plain;f=Makefile;h=828c9fda601ca734cc6ee2b39e1054ec4f916884;hp=3552fe44bad0a63d4f52f09eeb2ddc7d56884f69;hb=70c0baf4bcec3a77f0626d5a7bfde87fc7339698;hpb=7fc0fc6a973713c4082181aceb3c03d99ef3297f diff --git a/Makefile b/Makefile index 3552fe4..828c9fd 100644 --- 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: