vernam/Makefile

37 lines
711 B
Makefile
Raw Normal View History

2024-10-22 02:25:57 +02:00
.POSIX:
.SUFFIXES:
VERSION = 1.0
TARGET = vernam
PREFIX ?= /usr/local
BINDIR = $(PREFIX)/bin
2024-11-05 00:44:58 +01:00
CFLAGS = -Os -march=native -mtune=native -pipe -s -std=c99 -pedantic -Wall
2024-10-22 02:25:57 +02:00
SRC = vernam.c
$(TARGET): $(SRC)
$(CC) $(SRC) -o $@ $(CFLAGS) $(LDFLAGS)
dist:
mkdir -p $(TARGET)-$(VERSION)
cp -R README.md $(TARGET) $(TARGET)-$(VERSION)
tar -cf $(TARGET)-$(VERSION).tar $(TARGET)-$(VERSION)
gzip $(TARGET)-$(VERSION).tar
rm -rf $(TARGET)-$(VERSION)
install: $(TARGET)
mkdir -p $(DESTDIR)$(BINDIR)
cp -p $(TARGET) $(DESTDIR)$(BINDIR)/$(TARGET)
chmod 755 $(DESTDIR)$(BINDIR)/$(TARGET)
uninstall:
rm $(DESTDIR)$(BINDIR)/$(TARGET)
clean:
rm $(TARGET)
all: $(TARGET)
.PHONY: all dist install uninstall clean