-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
34 lines (26 loc) · 859 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
#!/usr/bin/make -f
# Install lab commands
# Source directory
srcdir = $(shell pwd)
mkfdir := $(abspath $(lastword $(MAKEFILE_LIST)))
# Common prefix for installation directories.
# NOTE: This directory must exist when you start the install.
prefix = /usr/local
datarootdir = $(prefix)/share
datadir = $(datarootdir)
exec_prefix = $(prefix)
# Where to put the executable for the command 'gcc'.
bindir = $(exec_prefix)/bin
# Where to put the directories used by the compiler.
libexecdir = $(exec_prefix)/libexec
# Where to put the Info files.
infodir = $(datarootdir)/info
INSTALL = mkdir -p $(DESTDIR)$(bindir)/ && ln -sf
# INSTALL = install -D
subs = list new start restart passwd discard
.PHONY: install
install: lab $(subs)
lab: $(srcdir)/lab.sh
$(INSTALL) $< $(DESTDIR)$(bindir)/lab
%: $(srcdir)/lab-%.sh
$(INSTALL) $< $(DESTDIR)$(bindir)/lab-$@