-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
60 lines (31 loc) · 1.29 KB
/
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
47
48
49
50
51
52
53
54
55
56
57
58
.PHONY: clean
# Test for needed library files.
CPATH=
CC = gcc
CFLAGS =
CFLAGS += -Wall -Wextra
CFLAGS += -fopenmp
# CFLAGS += -O0
# CFLAGS += -O2
CFLAGS += -O3 -flto
SOFLAGS = -fPIC -shared
LDFLAGS = -lm
LIBSRC =
# library = $(C_LIB_PATH)
LIBSRC =
CFLAGS += -D'PLOT'
all: artificial_matrix.exe artificial_matrix_generation_double.o artificial_matrix_generation_float.o ordered_set.o libartificial_matrix_generation_double.so libartificial_matrix_generation_float.so
artificial_matrix.exe: artificial_matrix.c artificial_matrix_generation.c ordered_set.c $(LIBSRC)
$(CC) $(CFLAGS) -D'VERBOSE' $^ -o $@ $(LDFLAGS)
libartificial_matrix_generation_double.so: artificial_matrix_generation.c ordered_set.o
$(CC) $(CFLAGS) -D'ValueType=double' $(SOFLAGS) $^ -o $@ $(LDFLAGS)
libartificial_matrix_generation_float.so: artificial_matrix_generation.c ordered_set.o
$(CC) $(CFLAGS) -D'ValueType=float' $(SOFLAGS) $^ -o $@ $(LDFLAGS)
artificial_matrix_generation_double.o: artificial_matrix_generation.c
$(CC) $(CFLAGS) -D'ValueType=double' $^ -c -o $@ $(LDFLAGS)
artificial_matrix_generation_float.o: artificial_matrix_generation.c
$(CC) $(CFLAGS) -D'ValueType=float' $^ -c -o $@ $(LDFLAGS)
ordered_set.o: ordered_set.c
$(CC) $(CFLAGS) $^ -c -o $@ $(LDFLAGS)
clean:
$(RM) *.exe a.out *.so *.o