X-Git-Url: https://git.sesse.net/?p=cubemap;a=blobdiff_plain;f=Makefile.in;fp=Makefile;h=5a2de437e1ef62101b26fba16d1b7680a1fc5e37;hp=abadaf7fa2de44975af958092cb7ef94572de514;hb=c59d0e9dca008914d5498985e5d2f8611b82fe04;hpb=8d6d1226ccae5e2f04ccd74f1ceabd88300332fd diff --git a/Makefile b/Makefile.in similarity index 83% rename from Makefile rename to Makefile.in index abadaf7..5a2de43 100644 --- a/Makefile +++ b/Makefile.in @@ -1,9 +1,11 @@ -CC=gcc -CXX=g++ +CC=@CC@ +CXX=@CXX@ INSTALL=install PROTOC=protoc -CXXFLAGS=-Wall -O2 -g -pthread $(shell getconf LFS_CFLAGS) $(shell pkg-config --cflags libsystemd) -LDLIBS=-lprotobuf -pthread -lrt $(shell pkg-config --libs libsystemd) +CPPFLAGS=@CPPFLAGS@ +CXXFLAGS=-Wall @CXXFLAGS@ @protobuf_CFLAGS@ @libsystemd_CFLAGS@ +LDFLAGS=@LDFLAGS@ +LIBS=@LIBS@ @protobuf_LIBS@ @libsystemd_LIBS@ 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 state.pb.o @@ -17,7 +19,7 @@ all: cubemap %.pb.o: %.pb.cc $(CXX) -MMD -MP $(CPPFLAGS) $(CXXFLAGS) -o $@ -c $< cubemap: $(OBJS) - $(CXX) -o cubemap $(OBJS) $(LDLIBS) $(LDFLAGS) + $(CXX) -o cubemap $(OBJS) $(LIBS) $(LDFLAGS) DEPS=$(OBJS:.o=.d) -include $(DEPS) @@ -25,9 +27,9 @@ DEPS=$(OBJS:.o=.d) clean: $(RM) cubemap $(OBJS) $(DEPS) state.pb.h state.pb.cc -PREFIX=/usr/local -SYSCONFDIR=/etc -LOCALSTATEDIR=/var +PREFIX=@prefix@ +SYSCONFDIR=@sysconfdir@ +LOCALSTATEDIR=@localstatedir@ install: $(INSTALL) -m 755 -o root -g root -d \ $(DESTDIR)$(PREFIX)/bin \ @@ -41,8 +43,8 @@ install: $(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" \ + -e "s,@prefix[@],$(PREFIX),g" \ + -e "s,@sysconfdir[@],$(SYSCONFDIR),g" \ cubemap.service.in > $(DESTDIR)$(PREFIX)/lib/systemd/system/cubemap.service # Make sure we don't overwrite an existing configuration. test ! -f $(DESTDIR)$(SYSCONFDIR)/cubemap.config