-
Notifications
You must be signed in to change notification settings - Fork 143
/
Copy pathMakefile
37 lines (23 loc) · 857 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
# Makefile for compiling the MPI 2D FFT code for Epiphany
DEFS = -DMPI_BUF_SIZE=128
CCFLAGS += -O2 $(DEFS)
INCS = -I. -I/usr/local/browndeer/include -I/usr/local/browndeer/include/coprthr
LIBS = -L/usr/local/browndeer/lib -lcoprthr -lcoprthrcc -lm
TARGET = mpi_fft2d_host.x mpi_fft2d_tfunc.cbin.3.e32
all: $(TARGET)
.PHONY: clean install uninstall $(SUBDIRS)
.SUFFIXES:
.SUFFIXES: .c .o .x
mpi_fft2d_tfunc.cbin.3.e32: mpi_fft2d_tfunc.c
clcc --coprthr-cc -mtarget=e32 -D__link_mpi__ --dump-bin \
-I. -I/opt/adapteva/esdk/tools/e-gnu/epiphany-elf/include $(DEFS) \
-DCOPRTHR_MPI_COMPAT mpi_fft2d_tfunc.c
# clcc1 bug workaround.
chmod 644 $@
mpi_fft2d_host.x: mpi_fft2d_host.o
$(CC) -o mpi_fft2d_host.x mpi_fft2d_host.o $(LIBS)
.c.o:
$(CC) $(CCFLAGS) $(DEFS) $(INCS) -c $<
clean: $(SUBDIRS)
rm -f *.o *.x *.cbin.3.e32
distclean: clean