CC=@CC@ CXX=@CXX@ INSTALL=install PROTOC=protoc CPPFLAGS=@CPPFLAGS@ CPPFLAGS += -Itlse -DWITH_KTLS -DNO_TLS_LEGACY_SUPPORT -DNO_SSL_COMPATIBLE_INTERFACE -DLTM_DESC -DTLS_REEXPORTABLE -DNO_TLS_WITH_CHACHA20_POLY1305 CXXFLAGS=-Wall @CXXFLAGS@ @protobuf_CFLAGS@ @libsystemd_CFLAGS@ @libtomcrypt_CFLAGS@ LDFLAGS=@LDFLAGS@ LIBS=@LIBS@ @protobuf_LIBS@ @libsystemd_LIBS@ @libtomcrypt_LIBS@ 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 all: cubemap %.pb.cc %.pb.h : %.proto $(PROTOC) --cpp_out=. $< %.o: %.cpp state.pb.h $(CXX) -MMD -MP $(CPPFLAGS) $(CXXFLAGS) -o $@ -c $< %.o: %.c $(CC) -MMD -MP $(CPPFLAGS) $(CXXFLAGS) -o $@ -c $< %.pb.o: %.pb.cc $(CXX) -MMD -MP $(CPPFLAGS) $(CXXFLAGS) -o $@ -c $< cubemap: $(OBJS) $(CXX) -o cubemap $(OBJS) $(LIBS) $(LDFLAGS) DEPS=$(OBJS:.o=.d) -include $(DEPS) clean: $(RM) cubemap $(OBJS) $(DEPS) state.pb.h state.pb.cc PREFIX=@prefix@ SYSCONFDIR=@sysconfdir@ LOCALSTATEDIR=@localstatedir@ install: $(INSTALL) -m 755 -o root -g root -d \ $(DESTDIR)$(PREFIX)/bin \ $(DESTDIR)$(PREFIX)/share/man/man1 \ $(DESTDIR)$(SYSCONFDIR) \ $(DESTDIR)$(LOCALSTATEDIR)/lib/cubemap \ $(DESTDIR)$(LOCALSTATEDIR)/log/cubemap \ $(DESTDIR)$(PREFIX)/share/munin/plugins \ $(DESTDIR)/lib/systemd/system $(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/ gzip -c cubemap.1 > $(DESTDIR)$(PREFIX)/share/man/man1/cubemap.1.gz sed \ -e "s,@prefix[@],$(PREFIX),g" \ -e "s,@sysconfdir[@],$(SYSCONFDIR),g" \ cubemap.service.in > $(DESTDIR)/lib/systemd/system/cubemap.service # Make sure we don't overwrite an existing configuration. test ! -f $(DESTDIR)$(SYSCONFDIR)/cubemap.config sed \ -e "s,cubemap\.stats,$(LOCALSTATEDIR)/lib/cubemap/\0,g" \ -e "s,cubemap-input\.stats,$(LOCALSTATEDIR)/lib/cubemap/\0,g" \ -e "s,access\.log,$(LOCALSTATEDIR)/log/cubemap/\0,g" \ -e "s,cubemap\.log,$(LOCALSTATEDIR)/log/cubemap/\0,g" \ -e 's,^stream,#\0,g' \ -e 's,^udpstream,#\0,g' \ cubemap.config.sample > $(DESTDIR)$(SYSCONFDIR)/cubemap.config .PHONY: clean install .SUFFIXES: