1# makefile for vigenere 2# Created December 2019 by Oliver Mahmoudi (contact@olivermahmoudi.com) 3 4# Variables 5BINARY=vigenere 6CC=gcc 7CP=cp 8INSTALL=/usr/bin/install -m 755 9INSTALLPATH=/usr/local/bin 10MANPAGE=vigenere.1 11MANPATH=/usr/local/share/man/man1 12OBJ=vigenere.o 13 14# Targets 15%.o: %.c 16 $(CC) -c -o $@ $< 17 18$(BINARY): $(OBJ) 19 $(CC) -o $@ $^ 20 21install: $(BINARY) 22 $(INSTALL) $(BINARY) $(INSTALLPATH) 23 $(CP) $(MANPAGE) $(MANPATH) 24 25deinstall: 26 rm -vf $(INSTALLPATH)/$(BINARY) 27 rm -vf $(MANPATH)/$(MANPAGE) 28 29.PHONY: clean 30clean: 31 rm -vf $(BINARY) *.o 32