"Fossies" - the Fresh Open Source Software Archive

Member "reptyr-reptyr-0.8.0/Makefile" (29 Sep 2020, 1750 Bytes) of package /linux/privat/reptyr-reptyr-0.8.0.tar.gz:


As a special service "Fossies" has tried to format the requested text file into HTML format (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file. See also the last Fossies "Diffs" side-by-side code changes report for "Makefile": 0.7.0_vs_0.8.0.

    1 override CFLAGS := -MD -Wall -Werror -D_GNU_SOURCE -g $(CFLAGS)
    2 OBJS=reptyr.o reallocarray.o attach.o
    3 DEPS=$(wildcard *.d platform/*/*.d)
    4 UNAME_S := $(shell uname -s)
    5 ifeq ($(UNAME_S),Linux)
    6 	OBJS += platform/linux/linux_ptrace.o platform/linux/linux.o
    7 endif
    8 ifeq ($(UNAME_S),FreeBSD)
    9 	OBJS += platform/freebsd/freebsd_ptrace.o platform/freebsd/freebsd.o
   10 	LDFLAGS += -lprocstat
   11 endif
   12 # Note that because of how Make works, this can be overridden from the
   13 # command-line.
   14 #
   15 # e.g. install to /usr with `make PREFIX=/usr`
   16 PREFIX=/usr/local
   17 BINDIR=$(PREFIX)/bin
   18 MANDIR=$(PREFIX)/share/man
   19 
   20 PKG_CONFIG ?= pkg-config
   21 PYTHON_CMD ?= python2
   22 
   23 all: reptyr
   24 
   25 reptyr: $(OBJS)
   26 
   27 ifeq ($(DISABLE_TESTS),)
   28 test: reptyr test/victim PHONY
   29 	$(PYTHON_CMD) test/basic.py
   30 	$(PYTHON_CMD) test/tty-steal.py
   31 else
   32 test: all
   33 endif
   34 
   35 VICTIM_CFLAGS ?= $(CFLAGS)
   36 VICTIM_LDFLAGS ?= $(LDFLAGS)
   37 test/victim: test/victim.o
   38 test/victim: override CFLAGS := $(VICTIM_CFLAGS)
   39 test/victim: override LDFLAGS := $(VICTIM_LDFLAGS)
   40 
   41 clean:
   42 	rm -f reptyr $(OBJS) test/victim.o test/victim $(DEPS)
   43 
   44 BASHCOMPDIR ?= $(shell $(PKG_CONFIG) --variable=completionsdir bash-completion 2>/dev/null)
   45 
   46 install: reptyr
   47 	install -d -m 755 $(DESTDIR)$(BINDIR)
   48 	install -m 755 reptyr $(DESTDIR)$(BINDIR)/reptyr
   49 	install -d -m 755 $(DESTDIR)$(MANDIR)/man1
   50 	install -m 644 reptyr.1 $(DESTDIR)$(MANDIR)/man1/reptyr.1
   51 	install -d -m 755 $(DESTDIR)$(MANDIR)/fr/man1
   52 	install -m 644 reptyr.fr.1 $(DESTDIR)$(MANDIR)/fr/man1/reptyr.1
   53 	bashcompdir=$(BASHCOMPDIR) ; \
   54 	test -z "$$bashcompdir" && bashcompdir=/etc/bash_completion.d ; \
   55 	install -d -m 755 $(DESTDIR)$$bashcompdir ; \
   56 	install -m 644 reptyr.bash $(DESTDIR)$$bashcompdir/reptyr
   57 
   58 .PHONY: PHONY
   59 
   60 # Pull-in dependencies generated by -MD
   61 -include $(OBJS:.o=.d)