-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile.am
144 lines (123 loc) · 3.89 KB
/
Makefile.am
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
133
134
135
136
137
138
139
140
141
142
143
144
# A few file definitions
#-----------------------
SUBDIRS = self_test
# Define the sources
sources = micromagnetics_element.cc \
micromagnetics_boundary_element.cc \
energy_functions.cc \
ode_problem.cc \
template_free_poisson.cc \
magnetic_parameters.cc \
llg_problem.cc \
llg_factories.cc \
variable_order_quadrature.cc \
generic_poisson_problem.cc \
boundary_element_handler.cc \
pinned_boundary_element_handler.cc \
template_free_poisson_flux.cc \
residual_calculator.cc \
oomph_factories.cc \
my_generic_problem.cc \
magnetics_helpers.cc \
magnetostatics_calculator.cc \
vector_helpers.cc \
renormalisation_handler.cc \
cayley_integrators.cc
# Include files which shouldn't be compiled
incl_cc_files =
# Define the headers
headers = array_interpolator.h \
new_interpolators.h \
micromagnetics_boundary_element.h \
energy_functions.h \
micromagnetics_element.h \
generic_poisson_problem.h \
micromagnetics_flux_element.h \
my_cli.h \
my_generic_problem.h \
llg_problem.h \
llg_cli.h \
llg_factories.h \
magnetic_parameters.h \
template_free_poisson_flux.h \
magnetics_helpers.h \
template_free_poisson.h \
magnetostatic_field_flux_element.h \
magpar_requirements.h \
mallinson_solution.h \
variable_order_quadrature.h \
vector_helpers.h \
boundary_element_handler.h \
pinned_boundary_element_handler.h \
residual_calculator.h \
poisson_test_problem.h \
sum_of_matrices_preconditioner.h \
single_element_mesh.h \
ode_problem.h \
oomph_factories.h \
micromag_types.h \
magnetostatics_calculator.h \
llg_preconditioners.h \
simpler_cubic_mesh.h \
nodal_quadrature.h \
cayley_integrators.h \
bdf2_with_predictor.h \
interpolator.h \
renormalisation_handler.h \
general_inner_iteration_precondtioner.h
# If we have hlib then compile that header too
if OOMPH_HAS_HLIB
headers += hmatrix.h
endif
# Define name of library
libname = micromag
# Combine headers and sources
headers_and_sources = $(headers) $(sources)
# Define the library that gets placed in lib directory
#-----------------------------------------------------
lib_LTLIBRARIES = libmicromag.la
# Sources that the library depends on:
#-------------------------------------
libmicromag_la_SOURCES = $(headers_and_sources)
# The library's include headers:
#-------------------------------
# Headers that are to be included in the $(includedir) directory:
# This is the combined header which contains "#include<...>" commands
# for the real headers in the subdirectory below $(includedir)
include_HEADERS = $(libname).h
#Here's the subdirectory where the actual header files are placed
library_includedir=$(includedir)/$(libname)
#These are the header files that are to be placed in subdirectory
library_include_HEADERS=$(headers) $(incl_cc_files)
# Required libraries
#-------------------
# Include path for library headers
AM_CPPFLAGS += -I/usr/local/include/HLib/
# Combined header file
#---------------------
# Rule for building combined header (dummy target never gets made so
# the combined header is remade every time)
$(libname).h: dummy_$(libname).h
dummy_$(libname).h: $(headers)
echo "./$(libname)" $(headers) > all_$(libname).aux
$(AWK) -f $(top_srcdir)/bin/headers.awk < \
all_$(libname).aux > $(libname).h
sed -e 's/</ "/g' -e 's/>/"/g' -i $(libname).h
rm all_$(libname).aux
# Extra hook for install: Optionally replace headers by symbolic links
#---------------------------------------------------------------------
if SYMBOLIC_LINKS_FOR_HEADERS
install-data-hook:
(cd $(library_includedir) && rm -f $(headers) $(incl_cc_files) )
(echo "$(headers) $(incl_cc_files)" > include_files.list )
($(top_srcdir)/bin/change_headers_to_links.sh `pwd`)
($(LN_S) `cat include_files.list.aux` $(library_includedir) )
(rm -r include_files.list.aux include_files.list )
else
install-data-hook:
endif
# Cleanup: Kill automatically generated combined header file
clean-local:
rm -f $(libname).h *~
distclean-local:
rm -f $(libname).h *~