-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile.in
44 lines (31 loc) · 1020 Bytes
/
Makefile.in
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
CXXFLAGS = -O3 -Wall -pedantic-errors -pedantic -std=c++14 -fvisibility=hidden -fpic -fno-semantic-interposition $(INCLUDEFLAG)
LDFLAGS = -s -O2 -O2 -pthread
OBJ = obj
LIB = lib
LIBPATH = $(PREFIX)/lib
INCLUDEPATH = $(PREFIX)/include/valmath/val
DATAPATH = $(PREFIX)/share/valmath/data
BINPATH = $(PREFIX)/bin
VALPTH = $(PREFIX)/share/valmath
libvalmath.so: $(OBJ)/libvalmath.o
mkdir -p $(LIB)
$(CXX) -shared -o $(LIB)/libvalmath.so $(OBJ)/libvalmath.o $(LDFLAGS)
$(OBJ)/libvalmath.o : $(DIRPATH)/src/libmain.cpp
mkdir -p $(OBJ)
$(CXX) -c $(CXXFLAGS) $(DIRPATH)/src/libmain.cpp -o $@
.PHONY clean:
clean:
rm -r -f $(OBJ) $(LIB)
.PHONY install:
install:
mkdir -p $(INCLUDEPATH) $(DATAPATH) $(BINPATH) $(LIBPATH)
cp -r $(DIRPATH)/include/* $(INCLUDEPATH)
cp $(DIRPATH)/data/* $(DATAPATH)
cp bin/val-config $(BINPATH)/
cp lib/libvalmath.so $(LIBPATH)/
.PHONY uninstall:
uninstall:
rm -f $(LIBPATH)/libvalmath.so
rm -f $(BINPATH)/val-config
rm -r -f $(VALPTH)
rm -r -f $(PREFIX)/include/valmath