blob: ee22558f2d394a3a7eb6ec10f916f86763466bf6 (
plain) (
blame)
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
|
.PHONY: all clean install
CC = cc
INSTALL = install
prefix = /usr/local
bindir = $(prefix)/bin
datarootdir = $(prefix)/share
mandir = $(datarootdir)/man
all = rxhv rxhv.1
CFLAGS += -Wall -Wextra -pedantic
all: $(all)
rxhv: rxhv.c
$(CC) $(CFLAGS) -o rxhv rxhv.c
rxhv.1: rxhv.1.s rxhv
@echo building manpage...
@set -e; \
cp rxhv.1.s rxhv.1; \
printf '\n.SH VERSION\n\n' >>rxhv.1; \
printf '.nf\n' >>rxhv.1; \
printf 'HardV ' >>rxhv.1; \
./rxhv --version | head -n1 | cut -d' ' -f2 >>rxhv.1; \
printf '.fi\n' >>rxhv.1;
clean:
@rm -rf $(all) *.tmp
install: $(all)
@$(INSTALL) -d $(bindir)
$(INSTALL) rxhv $(bindir)
@$(INSTALL) -d $(mandir)/man1
$(INSTALL) rxhv.1 $(mandir)/man1
|