6 CPPFLAGS += -Itlse -DWITH_KTLS -DNO_TLS_LEGACY_SUPPORT -DNO_SSL_COMPATIBLE_INTERFACE -DLTM_DESC -DTLS_REEXPORTABLE -DNO_TLS_WITH_CHACHA20_POLY1305
7 CXXFLAGS=-Wall @CXXFLAGS@ @protobuf_CFLAGS@ @libsystemd_CFLAGS@ @libtomcrypt_CFLAGS@ -pthread
9 LDFLAGS=@LDFLAGS@ -pthread
10 LIBS=@LIBS@ @protobuf_LIBS@ @libsystemd_LIBS@ @libtomcrypt_LIBS@
12 OBJS=main.o client.o server.o stream.o udpstream.o serverpool.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 timespec.o state.pb.o tlse/tlse.o
14 ifeq (@have_ffmpeg@,yes)
15 all: cubemap ffmpeg_metacube_hack.so
20 %.pb.cc %.pb.h : %.proto
21 $(PROTOC) --cpp_out=. $<
24 $(CXX) -MMD -MP $(CPPFLAGS) $(CXXFLAGS) -o $@ -c $<
26 $(CC) -MMD -MP $(CPPFLAGS) $(CXXFLAGS) -o $@ -c $<
28 $(CXX) -MMD -MP $(CPPFLAGS) $(CXXFLAGS) -o $@ -c $<
30 $(CXX) -o cubemap $(OBJS) $(LIBS) $(LDFLAGS)
31 ffmpeg_metacube_hack.so: ffmpeg_metacube_hack.c
32 $(CC) -shared $(CPPFLAGS) $(CFLAGS) -fPIC -o $@ $< -ldl
38 $(RM) cubemap $(OBJS) $(DEPS) state.pb.h state.pb.cc ffmpeg_metacube_hack.so
41 SYSCONFDIR=@sysconfdir@
42 LOCALSTATEDIR=@localstatedir@
45 $(INSTALL) -m 755 -o root -g root -d \
46 $(DESTDIR)$(PREFIX)/bin \
47 $(DESTDIR)$(PREFIX)/share/man/man1 \
48 $(DESTDIR)$(SYSCONFDIR) \
49 $(DESTDIR)$(LOCALSTATEDIR)/lib/cubemap \
50 $(DESTDIR)$(LOCALSTATEDIR)/log/cubemap \
51 $(DESTDIR)$(PREFIX)/share/munin/plugins \
52 $(DESTDIR)/lib/systemd/system
53 $(INSTALL) -m 755 -o root -g root cubemap $(DESTDIR)$(PREFIX)/bin/cubemap
54 $(INSTALL) -m 755 -o root -g root munin/cubemap munin/cubemap_input $(DESTDIR)$(PREFIX)/share/munin/plugins/
55 ifeq (@have_ffmpeg@,yes)
56 $(INSTALL) -m 755 -o root -g root ffmpeg_metacube_hack.so $(DESTDIR)$(LIBDIR)/
58 gzip -c cubemap.1 > $(DESTDIR)$(PREFIX)/share/man/man1/cubemap.1.gz
60 -e "s,@prefix[@],$(PREFIX),g" \
61 -e "s,@sysconfdir[@],$(SYSCONFDIR),g" \
62 cubemap.service.in > $(DESTDIR)/lib/systemd/system/cubemap.service
63 # Make sure we don't overwrite an existing configuration.
64 test ! -f $(DESTDIR)$(SYSCONFDIR)/cubemap.config
66 -e "s,cubemap\.stats,$(LOCALSTATEDIR)/lib/cubemap/\0,g" \
67 -e "s,cubemap-input\.stats,$(LOCALSTATEDIR)/lib/cubemap/\0,g" \
68 -e "s,access\.log,$(LOCALSTATEDIR)/log/cubemap/\0,g" \
69 -e "s,cubemap\.log,$(LOCALSTATEDIR)/log/cubemap/\0,g" \
70 -e 's,^stream,#\0,g' \
71 -e 's,^udpstream,#\0,g' \
72 cubemap.config.sample > $(DESTDIR)$(SYSCONFDIR)/cubemap.config