-
Notifications
You must be signed in to change notification settings - Fork 350
/
makefile
47 lines (38 loc) · 911 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
42
43
44
45
46
47
OLD := MMult0
NEW := MMult0
#
# sample makefile
#
CC := gcc
LINKER := $(CC)
CFLAGS := -O2 -Wall -msse3
LDFLAGS := -lm
UTIL := copy_matrix.o \
compare_matrices.o \
random_matrix.o \
dclock.o \
REF_MMult.o \
print_matrix.o
TEST_OBJS := test_MMult.o $(NEW).o
%.o: %.c
$(CC) $(CFLAGS) -c $< -o $@
%.o: %.c
$(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
cleanall:
rm -f *.o *~ core *.x output*.m *.eps *.png