This repository has been archived on 2021-03-07. You can view files and clone it, but cannot push or open issues or pull requests.
sowm/Makefile

31 lines
658 B
Makefile
Raw Permalink Normal View History

2020-01-23 15:03:56 +00:00
CFLAGS += -std=c99 -Wall -Wextra -pedantic -Wold-style-declaration
2020-01-23 15:00:26 +00:00
CFLAGS += -Wmissing-prototypes -Wno-unused-parameter
PREFIX ?= /usr
BINDIR ?= $(PREFIX)/bin
2020-01-23 15:03:56 +00:00
CC ?= gcc
2019-10-11 11:48:34 +00:00
all: sowm
2019-10-15 14:12:10 +00:00
config.h:
cp config.def.h config.h
2019-10-11 11:48:34 +00:00
sowm: sowm.c sowm.h config.h Makefile
2021-01-11 23:26:05 +00:00
$(CC) -O3 $(CFLAGS) -o $@ $< -lX11 -lXinerama \
$(LDFLAGS) -Wno-missing-braces
2019-10-11 11:48:34 +00:00
install: all
2020-01-23 15:03:56 +00:00
install -Dm755 sowm $(DESTDIR)$(BINDIR)/sowm
mkdir -p $(DESTDIR)$(MANPREFIX)/man1
cp sowm.1 $(DESTDIR)$(MANPREFIX)/man1
chmod 644 $(DESTDIR)$(MANPREFIX)/man1/sowm.1
2019-10-11 11:48:34 +00:00
2020-02-16 17:39:15 +00:00
uninstall:
rm -f $(DESTDIR)$(BINDIR)/sowm
2019-10-11 11:48:34 +00:00
clean:
2019-10-11 18:38:58 +00:00
rm -f sowm *.o
nuke: clean
rm -f config.h
.PHONY: all install uninstall clean