finger

finger fortune@hhvn.uk
git clone https://hhvn.uk/finger
git clone git://hhvn.uk/finger
Log | Files | Refs | LICENSE

makefile (476B)


      1 PREFIX	= /usr/local
      2 CC	?= cc
      3 OBJ	= finger.o strlcpy.o
      4 BIN	= finger
      5 COMMIT  = `git log HEAD...HEAD~1 --pretty=format:%h`
      6 
      7 $(BIN): $(OBJ)
      8 	$(CC) -g $(CFLAGS) $(LDFLAGS) -o $@ $(OBJ)
      9 
     10 .c.o:
     11 	$(CC) -g $(CFLAGS) $(LDFLAGS) -o $@ -c $<
     12 
     13 clean:
     14 	rm $(BIN) $(OBJ)
     15 
     16 install: $(BIN)
     17 	install -m0755 $(BIN) $(PREFIX)/bin/$(BIN)
     18 	sed "s/COMMIT/$(COMMIT)/" \
     19 		< $(BIN).1 \
     20 		> $(PREFIX)/share/man/man1/$(BIN).1
     21 
     22 uninstall:
     23 	-rm $(PREFIX)/bin/$(BIN)
     24 	-rm $(PREFIX)/share/man/man1/$(BIN).1