sowm: fix Makefile dependencies

So the binary no longer need to be deleted for a recompilation.
This commit is contained in:
zsugabubus 2020-06-16 10:12:52 +02:00
parent 6ca1ff91a4
commit 0964d47d07
No known key found for this signature in database
GPG Key ID: 7853EF3E8EB3181B
1 changed files with 5 additions and 3 deletions

View File

@ -4,13 +4,13 @@ PREFIX ?= /usr
BINDIR ?= $(PREFIX)/bin
CC ?= gcc
all: config.h sowm
all: sowm
config.h:
cp config.def.h config.h
sowm:
$(CC) -O3 $(CFLAGS) -o sowm sowm.c -lX11 $(LDFLAGS)
sowm: sowm.c sowm.h config.h Makefile
$(CC) -O3 $(CFLAGS) -o $@ $< -lX11 $(LDFLAGS)
install: all
install -Dm755 sowm $(DESTDIR)$(BINDIR)/sowm
@ -20,3 +20,5 @@ uninstall:
clean:
rm -f sowm *.o
.PHONY: all install uninstall clean