-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
43 lines (36 loc) · 854 Bytes
/
Makefile
File metadata and controls
43 lines (36 loc) · 854 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
# Makefile for sl (Steam Locomotive)
# Author: Reverend Steven Milanese
PREFIX = /usr/local
BINDIR = $(PREFIX)/bin
INSTALL = install
RM = rm -f
# Default target
all:
@echo "sl - Steam Locomotive"
@echo "Usage: make install - Install sl to $(BINDIR)"
@echo " make uninstall - Remove sl from $(BINDIR)"
@echo " make test - Test sl locally"
# Install sl
install:
$(INSTALL) -d $(BINDIR)
$(INSTALL) -m 755 sl $(BINDIR)/sl
@echo "sl installed to $(BINDIR)/sl"
@echo "Type 'sl' to see the train!"
# Uninstall sl
uninstall:
$(RM) $(BINDIR)/sl
@echo "sl removed from $(BINDIR)"
# Test locally
test:
./sl
# Run with different options
demo:
@echo "=== Classic Train ==="
./sl
@echo "=== Flying Train ==="
./sl -F
@echo "=== C51 Train ==="
./sl -c
@echo "=== Accident ==="
./sl -a
.PHONY: all install uninstall test demo