Commit cfcc91b0 authored by Georgi Chorbadzhiyski's avatar Georgi Chorbadzhiyski

Makefile: Show what is being done not the full commands.

With this patch the DVBlast compilation output is not
cluttered with the full command lines and makes it easier to
spot warnings and errors. If you want to see what commands are
executed run make V=1 or export V=1 and then make.

The new "clean" output will look like this:

make all
  CC      dvblast.c
  CC      util.c
  CC      dvb.c
  CC      udp.c
  CC      asi.c
  CC      demux.c
  CC      output.c
  CC      en50221.c
  CC      comm.c
  CC      mrtg-cnt.c
  LINK    dvblast
  CC      dvblastctl.c
  LINK    dvblastctl

make install
  INSTALL dvblast.1 -> /usr/local/share/man/man1
  INSTALL dvblast dvblastctl dvblast_mmi.sh -> /usr/local/bin

make uninstall
  RM      /usr/local/bin/dvblast
  RM      /usr/local/bin/dvblastctl
  RM      /usr/local/bin/dvblast_mmi.sh
  RM      /usr/local/share/man/man1/dvblast.1

make clean
  CLEAN   dvblast dvblastctl dvblast.o util.o dvb.o udp.o asi.o demux.o output.o en50221.o comm.o mrtg-cnt.o util.o dvblastctl.o

make archive
  ARCHIVE dvblast-2.0.0.tar.bz2
  -rw-r--r-- 1 gf users 108030 Sep  9 12:12 dvblast-2.0.0.tar.bz2
Signed-off-by: default avatarGeorgi Chorbadzhiyski <gf@unixsol.org>
parent 590c5db6
...@@ -18,32 +18,59 @@ LDLIBS_DVBLAST += -lpthread ...@@ -18,32 +18,59 @@ LDLIBS_DVBLAST += -lpthread
OBJ_DVBLAST = dvblast.o util.o dvb.o udp.o asi.o demux.o output.o en50221.o comm.o mrtg-cnt.o OBJ_DVBLAST = dvblast.o util.o dvb.o udp.o asi.o demux.o output.o en50221.o comm.o mrtg-cnt.o
OBJ_DVBLASTCTL = util.o dvblastctl.o OBJ_DVBLASTCTL = util.o dvblastctl.o
ifndef V
Q = @
endif
CLEAN_OBJS = dvblast dvblastctl $(OBJ_DVBLAST) $(OBJ_DVBLASTCTL)
INSTALL_BIN = dvblast dvblastctl dvblast_mmi.sh
INSTALL_MAN = dvblast.1
PREFIX ?= /usr/local PREFIX ?= /usr/local
BIN = $(DESTDIR)/$(PREFIX)/bin BIN = $(subst //,/,$(DESTDIR)/$(PREFIX)/bin)
MAN = $(DESTDIR)/$(PREFIX)/share/man/man1 MAN = $(subst //,/,$(DESTDIR)/$(PREFIX)/share/man/man1)
all: dvblast dvblastctl all: dvblast dvblastctl
$(OBJ_DVBLAST) $(OBJ_DVBLASTCTL): Makefile dvblast.h en50221.h comm.h version.h asi.h .PHONY: clean install uninstall dist
%.o: %.c Makefile dvblast.h en50221.h comm.h version.h asi.h mrtg-cnt.h
@echo "CC $<"
$(Q)$(CC) $(CFLAGS) -c $<
dvblast: $(OBJ_DVBLAST) dvblast: $(OBJ_DVBLAST)
$(CC) -o $@ $(OBJ_DVBLAST) $(LDLIBS_DVBLAST) $(LDLIBS) @echo "LINK $@"
$(Q)$(CC) -o $@ $(OBJ_DVBLAST) $(LDLIBS_DVBLAST) $(LDLIBS)
dvblastctl: $(OBJ_DVBLASTCTL) dvblastctl: $(OBJ_DVBLASTCTL)
@echo "LINK $@"
$(Q)$(CC) -o $@ $(OBJ_DVBLASTCTL) $(LDLIBS_DVBLAST) $(LDLIBS)
clean: clean:
@rm -f dvblast dvblastctl $(OBJ_DVBLAST) $(OBJ_DVBLASTCTL) @echo "CLEAN $(CLEAN_OBJS)"
$(Q)rm -f $(CLEAN_OBJS)
install: all install: all
@install -d $(BIN) @install -d "$(BIN)"
@install -d $(MAN) @install -d "$(MAN)"
@install dvblast dvblastctl dvblast_mmi.sh $(BIN) @echo "INSTALL $(INSTALL_MAN) -> $(MAN)"
@install -m 644 dvblast.1 $(MAN) $(Q)install -m 644 dvblast.1 "$(MAN)"
@echo "INSTALL $(INSTALL_BIN) -> $(BIN)"
$(Q)install dvblast dvblastctl dvblast_mmi.sh "$(BIN)"
uninstall: uninstall:
@rm $(BIN)/dvblast $(BIN)/dvblastctl $(BIN)/dvblast_mmi.sh $(MAN)/dvblast.1 @-for FILE in $(INSTALL_BIN); do \
echo "RM $(BIN)/$$FILE"; \
rm "$(BIN)/$$FILE"; \
done
@-for FILE in $(INSTALL_MAN); do \
echo "RM $(MAN)/$$FILE"; \
rm "$(MAN)/$$FILE"; \
done
dist: dist: clean
( cd ../ && \ @echo "ARCHIVE dvblast-$(VERSION).tar.bz2"
$(Q)( cd ../ && \
tar -cj --exclude-vcs --exclude $(TOPDIR)/*.tar.bz2 $(TOPDIR)/ > $(TOPDIR)/dvblast-$(VERSION).tar.bz2 ) tar -cj --exclude-vcs --exclude $(TOPDIR)/*.tar.bz2 $(TOPDIR)/ > $(TOPDIR)/dvblast-$(VERSION).tar.bz2 )
$(Q)ls -l dvblast-$(VERSION).tar.bz2
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment