Merge pull request #41 from orbea/gentoo
[rover.git] / Makefile
blobc2890fe8b335f37f1c422fe9ec782f06e62ce6ae
1 PREFIX ?= /usr/local
2 BINDIR ?= $(PREFIX)/bin
3 DATAROOTDIR ?= $(PREFIX)/share
4 DATADIR ?= $(DATAROOTDIR)
5 MANDIR ?= $(DATADIR)/man
7 CFLAGS ?= -O2
9 PKG_CONFIG ?= pkg-config
11 CFLAGS_NCURSESW := `$(PKG_CONFIG) --cflags ncursesw`
12 LIBS_NCURSESW := `$(PKG_CONFIG) --libs ncursesw`
14 all: rover
16 rover: rover.c config.h
17 $(CC) $(CFLAGS) $(CFLAGS_NCURSESW) -o $@ $< $(LDFLAGS) $(LIBS_NCURSESW)
19 install: rover
20 rm -f $(DESTDIR)$(BINDIR)/rover
21 mkdir -p $(DESTDIR)$(BINDIR)
22 cp rover $(DESTDIR)$(BINDIR)/rover
23 mkdir -p $(DESTDIR)$(MANDIR)/man1
24 cp rover.1 $(DESTDIR)$(MANDIR)/man1/rover.1
26 uninstall:
27 rm -f $(DESTDIR)$(BINDIR)/rover
28 rm -f $(DESTDIR)$(MANDIR)/man1/rover.1
30 clean:
31 rm -f rover