-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathMakefile
More file actions
40 lines (30 loc) · 856 Bytes
/
Copy pathMakefile
File metadata and controls
40 lines (30 loc) · 856 Bytes
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
PACKAGE = bsed
VERSION = 1.0
prefix = /usr/local
bindir = ${prefix}/bin
datadir = ${prefix}/share
docdir = $(datadir)/doc
pkgdocdir = $(datadir)/doc/bsed
man1dir = $(datadir)/share/man/man1
CC = gcc
CFLAGS = -g -O2 -Wall
INSTALL = install
.PHONY: all doc-html install clean
all: bsed doc-html
.c.o:
$(CC) $(CFLAGS) -c $<
bsed: bsed.o
$(CC) $(LDFLAGS) $(CFLAGS) -o bsed $^
.PHONY: doc-html
doc-html: homepage/bsedman.html
homepage/bsedman.html: bsed.1
nroff -man bsed.1 | perl man2html >homepage/bsedman.html
install: bsed doc-html
$(INSTALL) -d $(DESTDIR)$(bindir)
$(INSTALL) -m 755 bsed $(DESTDIR)$(bindir)
$(INSTALL) -d $(DESTDIR)$(man1dir)
$(INSTALL) -m 644 bsed.1 $(DESTDIR)$(man1dir)
$(INSTALL) -d $(DESTDIR)$(pkgdocdir)
$(INSTALL) -m 644 homepage/bsedman.html homepage/index.html $(DESTDIR)$(pkgdocdir)
clean:
$(RM) bsed.o bsed