-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
40 lines (30 loc) · 967 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
ifeq ($(arch),K)
CC=fccpx
CFLAGS=-Kfast,openmp -SSL2BLAMP -I./COMMON/
CLINK=~/archives/CBLAS/lib/cblas_LINUX.a
else
CC=gcc
CFLAGS=-O2 -std=c99 -I./COMMON/
CLINK=/usr/lib/libcblas.dylib
endif
all: block
simple: lu_decomp_simple.o common.o main.o hpl_timer.o lu_solve.o
$(CC) $(CFLAGS) $^ $(CLINK) -o $@
block: lu_decomp_block.o common.o main.o hpl_timer_blocking.o lu_solve.o
$(CC) $(CFLAGS) $^ $(CLINK) -o $@
lu_solve.o: lu_solve.c COMMON/common.h
$(CC) $(CFLAGS) $< -c
lu_decomp_simple.o: lu_decomp_simple.c COMMON/common.h
$(CC) $(CFLAGS) $< -c
lu_decomp_block.o: lu_decomp_block.c COMMON/common.h
$(CC) $(CFLAGS) $< -c
common.o: COMMON/common.c COMMON/common.h
$(CC) $(CFLAGS) $< -c
main.o: main.c COMMON/common.h
$(CC) $(CFLAGS) $< -c
hpl_timer.o: COMMON/hpl_timer.c COMMON/hpl_timer.h
$(CC) $(CFLAGS) $< -c
hpl_timer_blocking.o: COMMON/hpl_timer.c COMMON/hpl_timer.h
$(CC) $(CFLAGS) $< -c -D_BLOCKING -o hpl_timer_blocking.o
clean:
rm -f *.o