-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
44 lines (32 loc) · 1.02 KB
/
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
40
41
42
43
44
CXX = clang++
CXXFLAGS = -std=c++2b -Wall -Wextra
INSTALL = install
INSTALL_DATA = $(INSTALL) -m 644
prefix := /usr/local
includedir := $(prefix)/include
SOURCES := $(wildcard src/*.hpp src/*/*.hpp src/*/*/*.hpp)
VERSION := $(shell cat VERSION)
all: $(SOURCES)
check: $(SOURCES)
$(CXX) -fsyntax-only $(CXXFLAGS) $<
install: installdirs $(SOURCES)
$(INSTALL_DATA) src/know.hpp $(DESTDIR)$(includedir)/
$(INSTALL_DATA) src/know/*.hpp $(DESTDIR)$(includedir)/know/
$(INSTALL_DATA) src/know/classes/*.hpp $(DESTDIR)$(includedir)/know/classes/
installdirs:
$(INSTALL) -d $(DESTDIR)$(includedir)/
$(INSTALL) -d $(DESTDIR)$(includedir)/know
$(INSTALL) -d $(DESTDIR)$(includedir)/know/classes
uninstall:
rm -f $(DESTDIR)$(includedir)/know.hpp
rm -f $(DESTDIR)$(includedir)/know/classes.hpp
rm -f $(DESTDIR)$(includedir)/know/classes/*.hpp
clean:
@rm -f *~
distclean: clean
mostlyclean: clean
maintainer-clean: clean
.PHONY: all check install uninstall
.PHONY: clean distclean mostlyclean maintainer-clean
.SECONDARY:
.SUFFIXES: