-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathMakefile
executable file
·63 lines (42 loc) · 1.32 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
56
57
58
59
60
61
62
###############################################################
# #
###############################################################
#-------------------------------------------------------------------------
# OpenMP compiler switch
OMP = -fopenmp
#OPT += -DUSE_MPI
OPT += -DGRID #gridding visibilities
OPT += -DFACETING #fitting by faceting
#-------------------------------------------------------------------------
SUP_INCL = -I.
LIB_OPT =
OPTIMIZE = -O3 -g
ifeq (FACETING,$(findstring FACETING,$(OPT)))
OPT += -DGRID
endif
ifeq (USE_MPI,$(findstring USE_MPI,$(OPT)))
CC = mpiCC -g
else
CC = g++
endif
OPTIONS = $(OPTIMIZE) $(OPT)
EXEC = RadioLensfit.x
OBJS = RadioLensfit.o read_coordinates.o distributions.o galaxy_visibilities.o evaluate_uv_grid.o generate_random_values.o likelihood.o random_gaussian.o marginalise_r.o
INCL = *.h Makefile
LIB_OPT = -lgsl -lgslcblas -lm
CPPFLAGS = $(OPTIONS) $(SUP_INCL) $(OMP)
LIBS = $(LIB_OPT) $(OMP)
.SUFFIXES: .o .cc .cxx .cpp .cu
.cc.o:
$(CC) -c $(CPPFLAGS) -o "$@" "$<"
.cxx.o:
$(CC) -c $(CPPFLAGS) -o "$@" "$<"
.cpp.o:
$(CC) -c $(CPPFLAGS) -o "$@" "$<"
$(EXEC): $(OBJS)
$(CC) $(OBJS) $(OPTIONS) $(LIBS) -o $(EXEC)
$(OBJS): $(INCL)
clean:
rm -f $(OBJS)
realclean: clean
rm -f $(EXEC)