-
Notifications
You must be signed in to change notification settings - Fork 2
/
Makefile
30 lines (24 loc) · 891 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
# -----------------------------------------------------------------------------
# CMake project wrapper Makefile ----------------------------------------------
# -----------------------------------------------------------------------------
SHELL = /bin/bash
RM = rm -Rf
MKDIR = mkdir -p
ifeq ($(PREFIX),)
PREFIX := /usr/local
endif
.PHONY: all clean install uninstall
all: clean
cd build && cmake -DCMAKE_BUILD_TYPE=$(build) .. && make
clean:
$(RM) build && $(MKDIR) build
$(RM) bin && $(MKDIR) bin
install: all
install -d $(DESTDIR)$(PREFIX)/lib/
install -m 644 bin/libtask.so $(DESTDIR)$(PREFIX)/lib/
install -d $(DESTDIR)$(PREFIX)/include/
mkdir -p $(DESTDIR)$(PREFIX)/include/task
install -m 644 include/task.h $(DESTDIR)$(PREFIX)/include/task/
uninstall:
$(RM) $(DESTDIR)$(PREFIX)/lib/libtask.so
$(RM) $(DESTDIR)$(PREFIX)/include/task