pexec

execute a program from standard input
git clone git://git.2f30.org/pexec
Log | Files | Refs

commit bfc7549b18b1619ccdcdfb7e0fc684338f1e1ccf
parent e17d95c405ee16356bc140c0553f4dc687a8bfc4
Author: sin <sin@2f30.org>
Date:   Fri, 23 Mar 2018 11:38:02 +0000

Add Makefile

Diffstat:
AMakefile | 35+++++++++++++++++++++++++++++++++++
1 file changed, 35 insertions(+), 0 deletions(-)

diff --git a/Makefile b/Makefile @@ -0,0 +1,35 @@ +VERSION = 0.0 +PREFIX = /usr/local +SRC = pexec.c +OBJ = pexec.o +BIN = pexec +DISTFILES = $(SRC) Makefile + +all: $(BIN) + +clean: + rm -f $(OBJ) $(BIN) $(BIN)-$(VERSION).tar.gz + +install: all + mkdir -p $(DESTDIR)$(PREFIX)/bin + cp -f $(BIN) $(DESTDIR)$(PREFIX)/bin + +uninstall: + rm -f $(DESTDIR)$(PREFIX)/bin/$(BIN) + +dist: + mkdir -p $(BIN)-$(VERSION) + cp $(DISTFILES) $(BIN)-$(VERSION) + tar -cf $(BIN)-$(VERSION).tar $(BIN)-$(VERSION) + gzip $(BIN)-$(VERSION).tar + rm -rf $(BIN)-$(VERSION) + +.PHONY: all clean install uninstall dist + +.SUFFIXES: .c .o + +.c.o: + $(CC) $(CPPFLAGS) $(CFLAGS) -c $< + +$(BIN): $(OBJ) + $(CC) -o $@ $(OBJ) $(LDFLAGS) $(LDLIBS)