-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
37 lines (29 loc) · 929 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
35
36
# src data --------------------------------------------------------
SRC_DIR := src
BIN = spinclude
UTIL = tarjan-util
# -----------------------------------------------------------------
# Install data ----------------------------------------------------
DESTDIR ?=/usr/local
INSTALLDIR_BIN=$(DESTDIR)/bin/
# -----------------------------------------------------------------
.PHONY: all
all:
$(MAKE) -C $(SRC_DIR) -j4
ln -sf $(SRC_DIR)/$(BIN) $(BIN)
ln -sf $(SRC_DIR)/$(UTIL) $(UTIL)
check:
@if [ ! -d submodules/googletest/googletest ]; then \
echo "ERROR: GoogleTest not found, did you forget to run" ; \
echo " git submodule update --init --recursive ?"; \
exit 1 ;\
fi
$(MAKE) check -C $(SRC_DIR)
clean:
$(MAKE) clean -C $(SRC_DIR)
rm -f $(BIN) $(UTIL)
install: all
mkdir -p $(INSTALLDIR_BIN)
install $(SRC_DIR)/$(BIN) $(INSTALLDIR_BIN)
uninstall:
rm -f $(INSTALLDIR_BIN)/$(BIN)