alols.xcape/Makefile
Matthew Martin 59db9c6846 Make Makefile more portable
- Use -d instead of -D
- Add all target
- Mark install target as phony
2015-01-19 17:32:20 -06:00

27 lines
547 B
Makefile

INSTALL=install
PREFIX=/usr
MANDIR?=/local/man/man1
TARGET := xcape
CFLAGS += -Wall
CFLAGS += `pkg-config --cflags xtst x11`
LDFLAGS += `pkg-config --libs xtst x11`
LDFLAGS += -pthread
all: $(TARGET)
$(TARGET): xcape.c
$(CC) $(CFLAGS) -o $@ $< $(LDFLAGS)
install:
$(INSTALL) -d -m 0755 $(DESTDIR)$(PREFIX)/bin
$(INSTALL) -d -m 0755 $(DESTDIR)$(PREFIX)$(MANDIR)
$(INSTALL) -m 0755 $(TARGET) $(DESTDIR)$(PREFIX)/bin/$(TARGET)
$(INSTALL) -m 0644 xcape.1 $(DESTDIR)$(PREFIX)$(MANDIR)/xcape.1
clean:
rm $(TARGET)
.PHONY: all clean install