~smlavine/navipage

ref: b8fb6db0f1f643ca60a267ce9e04556c0ac0b1d1 navipage/Makefile -rw-r--r-- 729 bytes
b8fb6db0Sebastian LaVine Enable debug builds when DEBUG=1 9 months ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
.POSIX:

include config.mk

SRC = err.c main.c
OBJ = $(SRC:.c=.o)

all: options navipage

options:
	@echo 'navipage build options:'
	@echo "CFLAGS      = $(CFLAGS)"
	@echo "DEBUGFLAGS  = $(DEBUGFLAGS)"
	@echo "CC          = $(CC)"

err.o: err.h

navipage.o: rogueutil.h

$(OBJ): config.mk

navipage: $(OBJ)
	$(CC) -o $@ $(OBJ) $(LDFLAGS)

clean:
	rm -f navipage $(OBJ)

install: all
	mkdir -p $(PREFIX)/bin
	cp -f navipage $(PREFIX)/bin
	chmod 755 $(PREFIX)/bin
	mkdir -p $(MANPREFIX)/man1
	sed "s/VERSION/$(VERSION)/g" < navipage.1 > $(MANPREFIX)/man1/navipage.1
	chmod 644 $(MANPREFIX)/man1/navipage.1

uninstall:
	rm -f $(PREFIX)/bin/navipage $(MANPREFIX)/man1/navipage.1

.PHONY: all options navipage clean install uninstall