-
-
Notifications
You must be signed in to change notification settings - Fork 54
/
Copy pathMakefile
56 lines (49 loc) · 779 Bytes
/
Makefile
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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
.POSIX:
.PHONY: all install clean
OS=posix
PREFIX=/usr/local
BINDIR=$(PREFIX)/bin
MANDIR=$(PREFIX)/share/man
ALL_CFLAGS=$(CFLAGS) -std=c99 -Wall -Wextra -Wshadow -Wmissing-prototypes -Wpedantic -Wno-unused-parameter
LDLIBS=-lrt
OBJ=\
build.o\
deps.o\
env.o\
graph.o\
htab.o\
log.o\
parse.o\
samu.o\
scan.o\
tool.o\
tree.o\
util.o\
os-$(OS).o
HDR=\
arg.h\
build.h\
deps.h\
env.h\
graph.h\
htab.h\
log.h\
os.h\
parse.h\
scan.h\
tool.h\
tree.h\
util.h
all: samu
.c.o:
$(CC) $(ALL_CFLAGS) -c -o $@ $<
samu: $(OBJ)
$(CC) $(LDFLAGS) -o $@ $(OBJ) $(LDLIBS)
$(OBJ): $(HDR)
install: samu samu.1
mkdir -p $(DESTDIR)$(BINDIR)
cp samu $(DESTDIR)$(BINDIR)/
mkdir -p $(DESTDIR)$(MANDIR)/man1
cp samu.1 $(DESTDIR)$(MANDIR)/man1/
clean:
rm -f samu $(OBJ)