forked from where-is-paul/matrix-factor
-
Notifications
You must be signed in to change notification settings - Fork 1
/
makefile
executable file
·41 lines (29 loc) · 956 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
include make_defs.inc
SRCDIR := .
BUILDDIR := build
TARGET_SYM := ldl_driver
TARGET_SKEW := skew_ldl_driver
TARBALL := matrix_factor.tar
OUTPUT := output_matrices/out*
SRC_GFLAGS = $(addprefix include/gflags/, gflags gflags_nc gflags_completions gflags_reporting)
INC_GFLAGS = $(addprefix -I, include/gflags)
INC_SYM = $(addprefix -I, source/)
include/gflags/%.o: include/gflags/%.cc
$(CC) -c $(DEBUG) $(CFLAGS) $(INC_GFLAGS) $< -o $@
%.o: %.cpp
$(CC) -c $(DEBUG) $(CFLAGS) $(INC_GFLAGS) $(INC_SYM) $< -o $@
$(TARGET_SYM): $(addsuffix .o, $(SRC_GFLAGS) $(TARGET_SYM))
$(CC) $? -o $@ $(LINKFLAGS)
matlab:
cd matlab_files
make
all: $(TARGET_SYM) matlab
mkdir -p output_matrices
clean:
$(RM) $(addsuffix .o, $(TARGET_SYM) $(SRC_GFLAGS))
$(RM) -r $(TARGET_SYM) $(TARBALL) $(OUTPUT)
tar:
tar cfv matrix_factor.tar ldl_driver.cpp skew_ldl_driver.cpp source
test:
@cd matlab_files; make --no-print-directory test
.PHONY : clean tar test