|
@@ -8,17 +8,16 @@ MANFLAGS=-h -h -v -V -N
|
8
|
8
|
|
9
|
9
|
HELP2MAN_VERSION := $(shell help2man --version 2>/dev/null)
|
10
|
10
|
|
11
|
|
-all:
|
|
11
|
+light: src/helpers.c src/light.c src/main.c
|
|
12
|
+ $(CC) $(CFLAGS) -g -o $@ $^
|
|
13
|
+
|
|
14
|
+man: light
|
12
|
15
|
ifndef HELP2MAN_VERSION
|
13
|
16
|
$(error "help2man is not installed")
|
14
|
17
|
endif
|
15
|
|
- $(CC) $(CFLAGS) -g -o light src/helpers.c src/light.c src/main.c
|
16
|
|
-exp:
|
17
|
|
- $(CC) $(CFLAGS) -E src/helpers.c src/light.c
|
18
|
|
-man:
|
19
|
18
|
help2man $(MANFLAGS) ./light | gzip - > light.1.gz
|
20
|
19
|
|
21
|
|
-install: all man
|
|
20
|
+install: light man
|
22
|
21
|
mkdir -p $(BINDIR)
|
23
|
22
|
cp -f ./light $(BINDIR)/light
|
24
|
23
|
chown root $(BINDIR)/light
|
|
@@ -33,4 +32,5 @@ uninstall:
|
33
|
32
|
|
34
|
33
|
clean:
|
35
|
34
|
rm -vfr *~ light light.1.gz
|
36
|
|
-
|
|
35
|
+
|
|
36
|
+.PHONY: man install uninstall clean
|