-
Notifications
You must be signed in to change notification settings - Fork 12
/
makefile
55 lines (45 loc) · 1.11 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
OLD := MMult_4x8_21
NEW := MMult_4x8_22
#
# sample makefile
#
CC := gcc
LINKER := $(CC)
#CFLAGS := -O0 -g -Wall
CFLAGS := -O3 -g -Wall
#LDFLAGS := -lm
UTIL := copy_matrix.o \
compare_matrices.o \
random_matrix.o \
dclock.o \
REF_MMult.o \
print_matrix.o \
kernel_m4n4k16.o \
reorder_a.o \
reorder_b.o \
int8kernel_m4.o \
int8kernel_m2.o \
int8kernel_m1.o
TEST_OBJS := test_MMult.o $(NEW).o
%.o: %.c
$(CC) $(CFLAGS) -c $< -o $@
%.o: %.S
$(CC) $(CFLAGS) -c $< -o $@
all:
make clean;
make test_MMult.x
test_MMult.x: $(TEST_OBJS) $(UTIL) parameters.h
$(LINKER) $(TEST_OBJS) $(UTIL) $(LDFLAGS) \
$(BLAS_LIB) -o $(TEST_BIN) $@
run:
make all
export OMP_NUM_THREADS=1
export GOTO_NUM_THREADS=1
echo "version = '$(NEW)';" > output_$(NEW).m
./test_MMult.x >> output_$(NEW).m
cp output_$(OLD).m output_old.m
cp output_$(NEW).m output_new.m
clean:
rm -f *.o *~ core *.x *.m
cleanall:
rm -f *.o *~ core *.x output*.m *.eps *.png