ssm/Makefile

39 lines
805 B
Makefile
Raw Normal View History

2024-07-26 08:56:48 +02:00
.POSIX:
.SUFFIXES:
VERSION = 1.0
TARGET = ssm
PREFIX ?= /usr/local
BINDIR = $(PREFIX)/bin
2024-10-22 02:22:23 +02:00
LDFLAGS != pkg-config --libs libnotify
INCFLAGS != pkg-config --cflags libnotify
CFLAGS = -Os -march=native -mtune=native -pipe -s -std=c99 -flto -pedantic -Wall $(INCFLAGS)
2024-07-26 08:56:48 +02:00
SRC = ssm.c
$(TARGET): $(SRC)
$(CC) $(SRC) -o $@ $(CFLAGS) $(LDFLAGS)
dist:
mkdir -p $(TARGET)-$(VERSION)
2024-10-22 02:28:32 +02:00
cp -R README.md $(TARGET) $(TARGET)-$(VERSION)
2024-07-26 08:56:48 +02:00
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:
2024-10-22 02:22:23 +02:00
rm $(DESTDIR)$(BINDIR)/$(TARGET)
2024-07-26 08:56:48 +02:00
clean:
2024-10-22 02:22:23 +02:00
rm $(TARGET)
2024-07-26 08:56:48 +02:00
all: $(TARGET)
.PHONY: all dist install uninstall clean