-
Notifications
You must be signed in to change notification settings - Fork 2
/
Makefile
46 lines (38 loc) · 846 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
37
38
39
40
41
42
43
44
45
46
# CMake wrapper
RELEASEBUILDIR=build/GLP.build/Release
DEBUGBUILDIR=build/GLP.build/Debug
UNAME_S := $(shell uname -s)
ifeq ($(UNAME_S),Linux)
PREFIX = /usr
endif
ifeq ($(UNAME_S),Darwin)
PREFIX = /usr/local/Cellar/glp/1.0
endif
all: release
release:
@mkdir -p $(RELEASEBUILDIR); \
cd $(RELEASEBUILDIR); \
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=$(PREFIX) ../../../GLP; \
make -j4; \
cd -
debug:
@mkdir -p $(DEBUGBUILDIR); \
cd $(DEBUGBUILDIR); \
cmake -DCMAKE_BUILD_TYPE=Debug ../../../GLP; \
make -j4; \
cd -
gendoc:
@mkdir -p build/Documentation
@cd GLP/Doxygen; \
doxygen Doxyfile; \
cd - \
install:
@cd $(RELEASEBUILDIR); \
make install; \
cd -
clean:
@if test -f $(RELEASEBUILDIR)/Makefile; then \
cd $(RELEASEBUILDIR); \
make clean; \
cd -; \
fi