-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
39 lines (32 loc) · 937 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
install_bin_targets = cronsh_setpgrp cronsh_loadenv cronsh cronshctl
install_lib_targets = cronsh-common
BINDIR = /usr/bin
LIBDIR = /usr/lib/cronsh
all: cronsh_loadenv cronsh_setpgrp
cronsh_loadenv cronsh_setpgrp:
gcc $(CCFLAGS) -o $@ [email protected]
install: all
for trg in $(install_bin_targets); do \
install $$trg $(BINDIR)/$$trg; \
done
install -d $(LIBDIR)
for trg in $(install_lib_targets); do \
install $$trg $(LIBDIR)/$$trg; \
done
uninstall:
for trg in $(install_bin_targets); do \
rm $(BINDIR)/$$trg; \
done
for trg in $(install_lib_targets); do \
rm $(LIBDIR)/$$trg; \
done
rmdir $(LIBDIR)
check_installation:
@for trg in $(install_bin_targets); do \
echo -n $(BINDIR)/$$trg:" "; \
cmp -s $$trg $(BINDIR)/$$trg && echo MATCH || echo MISMATCH; \
done
@for trg in $(install_lib_targets); do \
echo -n $(LIBDIR)/$$trg:" "; \
cmp -s $$trg $(LIBDIR)/$$trg && echo MATCH || echo MISMATCH; \
done