-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
42 lines (32 loc) · 1.16 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
SRC_BASE:=/home/blancm3/RPI-Research
ROSS:=$(SRC_BASE)/ROSS/INSTALL
CODESBASE:=$(SRC_BASE)/codes/INSTALL
#CODESNET:=$(SRC_BASE)/codes-net/INSTALL
ASPEN:=$(SRC_BASE)/aspen-2016
#if test -d $CODESBASE ;
# then $(error CODESBASE is undefined, see README.txt);
#fi
#ifndef ROSS
#$(error ROSS is undefined, see README.txt)
#endif
# ross conflates CFLAGS with CPPFLAGS, so use just this one
override CPPFLAGS += $(shell $(ROSS)/bin/ross-config --cflags) -I$(CODESBASE)/include -I$(ASPEN)/aspen -I$(ASPEN)/c
#override CPPFLAGS += -O3
CC = $(shell $(ROSS)/bin/ross-config --cc)
LDFLAGS = $(shell $(ROSS)/bin/ross-config --ldflags) -L$(CODESBASE)/lib -L$(ASPEN)/c -L$(ASPEN)/lib
LDLIBS = -laspenc -laspen -lcodes $(shell $(ROSS)/bin/ross-config --libs) -rdynamic
# Actual compilation directions:
AspenNet.o: AspenNet.c
$(CC) $(CPPFLAGS) -g -c AspenNet.c -o AspenNet.o
test: test.o
mpic++ -o test test.o $(LDFLAGS) $(LDLIBS)
test.o:
$(CC) -g $(CPPFLAGS) -c test.c -o test.o
AspenNet: AspenNet.o
mpic++ $(CPPFLAGS) -g -o AspenNet AspenNet.o $(LDFLAGS) $(LDLIBS)
testfile: test.o
$(CC) $(CPPFLAGS) -g test.o $(LDFLAGS) $(LDLIBS) -o test
clean:
rm -f *.o
rm -f AspenNet
rm -f test