-
Notifications
You must be signed in to change notification settings - Fork 13
/
Makefile
31 lines (23 loc) · 872 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
CXXFLAGS = -O2 -Wall -Wextra
PREFIX = /usr
SBINDIR = $(PREFIX)/bin
PROJECT = ntpdos
OBJ = $(PROJECT).o
all: $(PROJECT)
%.o: %.cpp
$(CXX) -c -o $@ $< $(CXXFLAGS)
$(PROJECT): $(OBJ)
$(CXX) -o $@ $^ $(CXXFLAGS)
.PHONY: clean
clean:
rm -f *.o *~ core $(PROJECT)
install: $(PROJECT)
install -Dm 755 $(PROJECT) $(DESTDIR)/$(SBINDIR)/$(PROJECT)
install -Dm 644 bash-completion/$(PROJECT) $(DESTDIR)/$(PREFIX)/share/bash-completion/completions/$(PROJECT)
install -Dm 644 -t $(DESTDIR)/$(PREFIX)/share/doc/$(PROJECT)/ README.md
install -Dm 644 LICENSE.md $(DESTDIR)/$(PREFIX)/share/licenses/$(PROJECT)/LICENSE.md
uninstall:
rm -f $(DESTDIR)/$(SBINDIR)/$(PROJECT)
rm -f $(DESTDIR)/$(PREFIX)/share/bash-completion/completions/$(PROJECT)
rm -f $(DESTDIR)/$(PREFIX)/share/doc/$(PROJECT)/README.md
rm -f $(DESTDIR)/$(PREFIX)/share/licenses/$(PROJECT)/LICENSE.md