Update makefile
This commit is contained in:
parent
894ac99171
commit
8b8de8f82d
2 changed files with 9 additions and 11 deletions
19
Makefile
19
Makefile
|
@ -1,25 +1,24 @@
|
||||||
.POSIX:
|
.POSIX:
|
||||||
.SUFFIXES:
|
|
||||||
|
|
||||||
VERSION = 1.0
|
VERSION = 1.0
|
||||||
TARGET = ssm
|
TARGET = ssm
|
||||||
PREFIX ?= /usr/local
|
PREFIX ?= /usr/local
|
||||||
BINDIR = $(PREFIX)/bin
|
BINDIR = $(PREFIX)/bin
|
||||||
|
|
||||||
LDFLAGS != pkg-config --libs libnotify
|
CFLAGS += -std=c99 -pedantic -Wall -D_POSIX_C_SOURCE=200809L
|
||||||
INCFLAGS != pkg-config --cflags libnotify
|
|
||||||
CFLAGS = -Os -march=native -mtune=native -pipe -s -std=c99 -flto -pedantic -Wall $(INCFLAGS)
|
|
||||||
|
|
||||||
SRC = ssm.c
|
SRC = ssm.c
|
||||||
|
OBJS = $(SRC:.c=.o)
|
||||||
|
|
||||||
$(TARGET): $(SRC)
|
.c.o:
|
||||||
$(CC) $(SRC) -o $@ $(CFLAGS) $(LDFLAGS)
|
$(CC) -o $@ $(CFLAGS) -c $<
|
||||||
|
|
||||||
|
$(TARGET): $(OBJS)
|
||||||
|
$(CC) -o $@ $(OBJS)
|
||||||
dist:
|
dist:
|
||||||
mkdir -p $(TARGET)-$(VERSION)
|
mkdir -p $(TARGET)-$(VERSION)
|
||||||
cp -R README.md $(TARGET) $(TARGET)-$(VERSION)
|
cp -R README.md $(TARGET) $(TARGET)-$(VERSION)
|
||||||
tar -cf $(TARGET)-$(VERSION).tar $(TARGET)-$(VERSION)
|
tar -czf $(TARGET)-$(VERSION).tar.gz $(TARGET)-$(VERSION)
|
||||||
gzip $(TARGET)-$(VERSION).tar
|
|
||||||
rm -rf $(TARGET)-$(VERSION)
|
rm -rf $(TARGET)-$(VERSION)
|
||||||
|
|
||||||
install: $(TARGET)
|
install: $(TARGET)
|
||||||
|
@ -28,10 +27,10 @@ install: $(TARGET)
|
||||||
chmod 755 $(DESTDIR)$(BINDIR)/$(TARGET)
|
chmod 755 $(DESTDIR)$(BINDIR)/$(TARGET)
|
||||||
|
|
||||||
uninstall:
|
uninstall:
|
||||||
rm $(DESTDIR)$(BINDIR)/$(TARGET)
|
rm -f $(DESTDIR)$(BINDIR)/$(TARGET)
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
rm $(TARGET)
|
rm -f $(TARGET) *.o
|
||||||
|
|
||||||
all: $(TARGET)
|
all: $(TARGET)
|
||||||
|
|
||||||
|
|
1
ssm.c
1
ssm.c
|
@ -1,4 +1,3 @@
|
||||||
#define _POSIX_C_SOURCE 200809L
|
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
|
Loading…
Reference in a new issue