-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
52 lines (37 loc) · 727 Bytes
/
Makefile
File metadata and controls
52 lines (37 loc) · 727 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
41
42
43
44
45
46
47
48
49
50
51
52
CC?= clang
GO?= go
STRIP?= strip
INSTALL?= install
CFLAGS?= -O2 -g -pipe
BINDIR?= $(HOME)/bin
CFLAGS+=\
-Wall\
-Wextra\
-Werror\
-pedantic
BINS= avatar markov monty setsid statfs tac tsize usleep
all: $(BINS)
avatar: avatar.go
$(GO) build -o $@ $^
markov: markov.go
$(GO) build -o $@ $^
monty: monty.go
$(GO) build -o $@ $^
statfs: statfs.o statfs.c
$(CC) -o $(@) $<
setsid: setsid.o setsid.c
$(CC) -o $(@) $<
tac: tac.o tac.c
$(CC) -o $(@) $<
tsize: tsize.o tsize.c
$(CC) -lncurses -o $@ $<
usleep: usleep.o usleep.c
$(CC) -o $(@) $<
%.o: %.c
$(CC) $(CFLAGS) -c -o $@ $(@:.o=.c)
clean:
rm -f *.o $(BINS)
install: $(BINS)
$(STRIP) $^
$(INSTALL) -Cv $^ $(BINDIR)
.PHONY: all clean install