-
Notifications
You must be signed in to change notification settings - Fork 20
/
Copy pathuf_makefile.local.in
63 lines (45 loc) · 1.31 KB
/
uf_makefile.local.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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
# -*- makefile -*-
## makefile for DRSS
.PHONY: clean realclean
include ../../Make.rules
##################################################################
##
## should not have to change too much beyond this point
##
OPT_FLAG = -O3 -fPIC
SPARSE_HOME=./SuiteSparse
INC=-I$(SPARSE_HOME)/UMFPACK/Include \
-I$(SPARSE_HOME)/AMD/Include -I$(SPARSE_HOME)/COLAMD/Include \
-I$(SPARSE_HOME)/UFconfig \
-I$(SPARSE_HOME)/KLU/Include -I$(SPARSE_HOME)/BTF/Include
BITS=-m64
CFLAGS=-Wall ${OPT_FLAG} ${INC} ${BITS}
CXXFLAGS=-Wall ${OPT_FLAG} ${INC} ${BITS}
LINK_FLAGS=${BITS}
## change this line since we have different top level drivers
OBJS = lsolver.o csolver.o
HDRS = lsolver.h solver_vec.h solver_def.h
ifeq ($(shell uname),Darwin)
EXEC = libsolvers.dylib
DYN_FLAG = -dynamiclib
else
EXEC = libsolvers.so
DYN_FLAG = -shared
endif
OBJS += $(wildcard $(SPARSE_HOME)/UMFPACK/Lib/*.o)
OBJS += $(wildcard $(SPARSE_HOME)/KLU/Lib/*.o)
OBJS += $(wildcard $(SPARSE_HOME)/AMD/Lib/*.o)
OBJS += $(wildcard $(SPARSE_HOME)/BTF/Lib/*.o)
OBJS += $(wildcard $(SPARSE_HOME)/COLAMD/Lib/*.o)
all: $(EXEC)
$(OBJS): $(HDRS)
$(EXEC): ${OBJS}
$(CXX) $^ -o ${EXEC} ${DYN_FLAG} ${BLAS} ${LIBFORTRAN} ${OPT_FLAG} ${LINK_FLAGS}
## other options
clean:
-rm -rf $(OBJS)
realclean:
-rm -rf $(OBJS) $(EXEC)
distclean:
-rm -rf $(OBJS) $(EXEC)
## end