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@
9 LIBS=@LIBS@ @protobuf_LIBS@ @libsystemd_LIBS@ @libtomcrypt_LIBS@
11 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 timespec.o state.pb.o tlse/tlse.o
15 %.pb.cc %.pb.h : %.proto
16 $(PROTOC) --cpp_out=. $<
19 $(CXX) -MMD -MP $(CPPFLAGS) $(CXXFLAGS) -o $@ -c $<
21 $(CC) -MMD -MP $(CPPFLAGS) $(CXXFLAGS) -o $@ -c $<
23 $(CXX) -MMD -MP $(CPPFLAGS) $(CXXFLAGS) -o $@ -c $<
25 $(CXX) -o cubemap $(OBJS) $(LIBS) $(LDFLAGS)
31 $(RM) cubemap $(OBJS) $(DEPS) state.pb.h state.pb.cc
34 SYSCONFDIR=@sysconfdir@
35 LOCALSTATEDIR=@localstatedir@
37 $(INSTALL) -m 755 -o root -g root -d \
38 $(DESTDIR)$(PREFIX)/bin \
39 $(DESTDIR)$(PREFIX)/share/man/man1 \
40 $(DESTDIR)$(SYSCONFDIR) \
41 $(DESTDIR)$(LOCALSTATEDIR)/lib/cubemap \
42 $(DESTDIR)$(LOCALSTATEDIR)/log/cubemap \
43 $(DESTDIR)$(PREFIX)/share/munin/plugins \
44 $(DESTDIR)/lib/systemd/system
45 $(INSTALL) -m 755 -o root -g root cubemap $(DESTDIR)$(PREFIX)/bin/cubemap
46 $(INSTALL) -m 755 -o root -g root munin/cubemap munin/cubemap_input $(DESTDIR)$(PREFIX)/share/munin/plugins/
47 gzip -c cubemap.1 > $(DESTDIR)$(PREFIX)/share/man/man1/cubemap.1.gz
49 -e "s,@prefix[@],$(PREFIX),g" \
50 -e "s,@sysconfdir[@],$(SYSCONFDIR),g" \
51 cubemap.service.in > $(DESTDIR)/lib/systemd/system/cubemap.service
52 # Make sure we don't overwrite an existing configuration.
53 test ! -f $(DESTDIR)$(SYSCONFDIR)/cubemap.config
55 -e "s,cubemap\.stats,$(LOCALSTATEDIR)/lib/cubemap/\0,g" \
56 -e "s,cubemap-input\.stats,$(LOCALSTATEDIR)/lib/cubemap/\0,g" \
57 -e "s,access\.log,$(LOCALSTATEDIR)/log/cubemap/\0,g" \
58 -e "s,cubemap\.log,$(LOCALSTATEDIR)/log/cubemap/\0,g" \
59 -e 's,^stream,#\0,g' \
60 -e 's,^udpstream,#\0,g' \
61 cubemap.config.sample > $(DESTDIR)$(SYSCONFDIR)/cubemap.config