~smlavine/navipage

ref: e43939dd843ea7deed52dce6c7019773e14314d8 navipage/Makefile -rw-r--r-- 819 bytes
e43939ddSebastian LaVine Remove MAX() and MIN() macros 7 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
40
41
42
.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)

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

clean:
	rm -f navipage navipage-debug $(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 debug clean install uninstall