forked from pseudotensor/grmonty
-
Notifications
You must be signed in to change notification settings - Fork 13
Expand file tree
/
Copy pathmakefile
More file actions
132 lines (108 loc) · 4.65 KB
/
makefile
File metadata and controls
132 lines (108 loc) · 4.65 KB
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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
#/***********************************************************************************
# Copyright 2013 Joshua C. Dolence, Charles F. Gammie, Monika Mo\'scibrodzka,
# and Po Kin Leung
#
# GRMONTY version 1.0 (released February 1, 2013)
#
# This file is part of GRMONTY. GRMONTY v1.0 is a program that calculates the
# emergent spectrum from a model using a Monte Carlo technique.
#
# This version of GRMONTY is configured to use input files from the HARM code
# available on the same site. It assumes that the source is a plasma near a
# black hole described by Kerr-Schild coordinates that radiates via thermal
# synchrotron and inverse compton scattering.
#
# You are morally obligated to cite the following paper in any
# scientific literature that results from use of any part of GRMONTY:
#
# Dolence, J.C., Gammie, C.F., Mo\'scibrodzka, M., \& Leung, P.-K. 2009,
# Astrophysical Journal Supplement, 184, 387
#
# Further, we strongly encourage you to obtain the latest version of
# GRMONTY directly from our distribution website:
# http://rainman.astro.illinois.edu/codelib/
#
# GRMONTY is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# GRMONTY is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with GRMONTY; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
#
#***********************************************************************************/
#
# requires an openmp-enabled version of gcc
#
CC = gcc
CFLAGS = -Wall -O2 -fopenmp -I$(INCDIR)
LDFLAGS = -lm -lgsl -lgslcblas -fopenmp
SRCDIR = src
INCDIR = include
BUILDDIR = build
SRCS = $(SRCDIR)/main.c \
$(SRCDIR)/physics/compton.c \
$(SRCDIR)/physics/radiation.c \
$(SRCDIR)/physics/jnu_mixed.c \
$(SRCDIR)/physics/hotcross.c \
$(SRCDIR)/physics/scatter_super_photon.c \
$(SRCDIR)/geometry/init_geometry.c \
$(SRCDIR)/geometry/tetrads.c \
$(SRCDIR)/geometry/geodesics.c \
$(SRCDIR)/model/harm_model.c \
$(SRCDIR)/model/harm_utils.c \
$(SRCDIR)/model/init_harm_data.c \
$(SRCDIR)/model/track_super_photon.c
OBJS = $(BUILDDIR)/main.o \
$(BUILDDIR)/compton.o \
$(BUILDDIR)/radiation.o \
$(BUILDDIR)/jnu_mixed.o \
$(BUILDDIR)/hotcross.o \
$(BUILDDIR)/scatter_super_photon.o \
$(BUILDDIR)/init_geometry.o \
$(BUILDDIR)/tetrads.o \
$(BUILDDIR)/geodesics.o \
$(BUILDDIR)/harm_model.o \
$(BUILDDIR)/harm_utils.o \
$(BUILDDIR)/init_harm_data.o \
$(BUILDDIR)/track_super_photon.o
INCS = $(INCDIR)/decs.h $(INCDIR)/constants.h $(INCDIR)/harm_model.h
grmonty : $(BUILDDIR) $(OBJS) $(INCS) makefile
$(CC) $(CFLAGS) -o grmonty $(OBJS) $(LDFLAGS)
$(BUILDDIR):
mkdir -p $(BUILDDIR)
$(BUILDDIR)/main.o: $(SRCDIR)/main.c $(INCS) makefile
$(CC) $(CFLAGS) -c -o $@ $<
$(BUILDDIR)/compton.o: $(SRCDIR)/physics/compton.c $(INCS) makefile
$(CC) $(CFLAGS) -c -o $@ $<
$(BUILDDIR)/radiation.o: $(SRCDIR)/physics/radiation.c $(INCS) makefile
$(CC) $(CFLAGS) -c -o $@ $<
$(BUILDDIR)/jnu_mixed.o: $(SRCDIR)/physics/jnu_mixed.c $(INCS) makefile
$(CC) $(CFLAGS) -c -o $@ $<
$(BUILDDIR)/hotcross.o: $(SRCDIR)/physics/hotcross.c $(INCS) makefile
$(CC) $(CFLAGS) -c -o $@ $<
$(BUILDDIR)/scatter_super_photon.o: $(SRCDIR)/physics/scatter_super_photon.c $(INCS) makefile
$(CC) $(CFLAGS) -c -o $@ $<
$(BUILDDIR)/init_geometry.o: $(SRCDIR)/geometry/init_geometry.c $(INCS) makefile
$(CC) $(CFLAGS) -c -o $@ $<
$(BUILDDIR)/tetrads.o: $(SRCDIR)/geometry/tetrads.c $(INCS) makefile
$(CC) $(CFLAGS) -c -o $@ $<
$(BUILDDIR)/geodesics.o: $(SRCDIR)/geometry/geodesics.c $(INCS) makefile
$(CC) $(CFLAGS) -c -o $@ $<
$(BUILDDIR)/harm_model.o: $(SRCDIR)/model/harm_model.c $(INCS) makefile
$(CC) $(CFLAGS) -c -o $@ $<
$(BUILDDIR)/harm_utils.o: $(SRCDIR)/model/harm_utils.c $(INCS) makefile
$(CC) $(CFLAGS) -c -o $@ $<
$(BUILDDIR)/init_harm_data.o: $(SRCDIR)/model/init_harm_data.c $(INCS) makefile
$(CC) $(CFLAGS) -c -o $@ $<
$(BUILDDIR)/track_super_photon.o: $(SRCDIR)/model/track_super_photon.c $(INCS) makefile
$(CC) $(CFLAGS) -c -o $@ $<
clean:
/bin/rm -rf $(BUILDDIR) *.o grmonty.spec
.PHONY: clean