rspan

Executes a given command after a randomized time span.
git clone git://git.noxz.tech/rspan
Log | Files | Refs | LICENSE

Makefile (772B)


      1 .POSIX:
      2 
      3 include config.mk
      4 
      5 SRC = rspan.c
      6 OBJ = $(SRC:.c=.o)
      7 
      8 all: options rspan
      9 
     10 options:
     11 	@echo rspan build options:
     12 	@echo "VERSION = $(VERSION)"
     13 	@echo "PREFIX  = $(PREFIX)"
     14 	@echo "CFLAGS  = $(STCFLAGS)"
     15 	@echo "CC      = $(CC)"
     16 
     17 .c.o:
     18 	$(CC) $(STCFLAGS) -c $<
     19 
     20 $(OBJ): config.mk
     21 
     22 rspan: $(OBJ)
     23 	$(CC) -o $@ $(OBJ) $(STCFLAGS)
     24 
     25 clean:
     26 	rm -f rspan $(OBJ)
     27 
     28 install: rspan
     29 	@echo installing executable to ${PREFIX}/bin
     30 	mkdir -p $(PREFIX)/bin
     31 	cp -f rspan $(PREFIX)/bin
     32 	chmod 755 $(PREFIX)/bin/rspan
     33 	@echo installing manual page to ${MANPREFIX}/man1
     34 	mkdir -p ${MANPREFIX}/man1
     35 	sed "s/VERSION/${VERSION}/g" < rspan.1 > ${MANPREFIX}/man1/rspan.1
     36 	chmod 644 ${MANPREFIX}/man1/rspan.1
     37 
     38 uninstall:
     39 	rm -f $(PREFIX)/bin/rspan
     40 
     41 .PHONY: all options clean install uninstall