stardis-solver

Solve coupled heat transfers
git clone git://git.meso-star.fr/stardis-solver.git
Log | Files | Refs | README | LICENSE

Makefile (19867B)


      1 # Copyright (C) 2016-2023 |Méso|Star> (contact@meso-star.com)
      2 #
      3 # This program is free software: you can redistribute it and/or modify
      4 # it under the terms of the GNU General Public License as published by
      5 # the Free Software Foundation, either version 3 of the License, or
      6 # (at your option) any later version.
      7 #
      8 # This program is distributed in the hope that it will be useful,
      9 # but WITHOUT ANY WARRANTY; without even the implied warranty of
     10 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
     11 # GNU General Public License for more details.
     12 #
     13 # You should have received a copy of the GNU General Public License
     14 # along with this program. If not, see <http://www.gnu.org/licenses/>.
     15 
     16 .POSIX:
     17 .SUFFIXES: # Clean up default inference rules
     18 
     19 include config.mk
     20 
     21 LIBNAME_STATIC = libsdis.a
     22 LIBNAME_SHARED = libsdis.so
     23 LIBNAME = $(LIBNAME_$(LIB_TYPE))
     24 
     25 MPI_DEF = -DSDIS_ENABLE_MPI
     26 
     27 ################################################################################
     28 # Library building
     29 ################################################################################
     30 MPI_SRC = src/sdis_mpi.c
     31 SRC =\
     32  src/sdis.c\
     33  src/sdis_brdf.c\
     34  src/sdis_camera.c\
     35  src/sdis_data.c\
     36  src/sdis_device.c\
     37  src/sdis_estimator.c\
     38  src/sdis_estimator_buffer.c\
     39  src/sdis_green.c\
     40  src/sdis_heat_path.c\
     41  src/sdis_heat_path_boundary.c\
     42  src/sdis_heat_path_conductive.c\
     43  src/sdis_interface.c\
     44  src/sdis_log.c\
     45  src/sdis_medium.c\
     46  src/sdis_misc.c\
     47  src/sdis_primkey.c\
     48  src/sdis_radiative_env.c\
     49  src/sdis_realisation.c\
     50  src/sdis_scene.c\
     51  src/sdis_solve.c\
     52  src/sdis_solve_camera.c\
     53  src/sdis_source.c\
     54  src/sdis_tile.c\
     55  $($(DISTRIB_PARALLELISM)_SRC)
     56 OBJ = $(SRC:.c=.o)
     57 DEP = $(SRC:.c=.d)
     58 
     59 build_library: .config $(DEP)
     60 	@$(MAKE) -fMakefile $$(for i in $(DEP); do echo -f $${i}; done) \
     61 	$$(if [ -n "$(LIBNAME)" ]; then \
     62 	     echo "$(LIBNAME)"; \
     63 	   else \
     64 	     echo "$(LIBNAME_SHARED)"; \
     65 	   fi)
     66 
     67 $(DEP) $(OBJ): config.mk
     68 
     69 $(LIBNAME_SHARED): $(OBJ)
     70 	$(CC) $(CFLAGS_SO) $(DPDC_CFLAGS) -o $@ $(OBJ) $(LDFLAGS_SO) $(DPDC_LIBS)
     71 
     72 $(LIBNAME_STATIC): libsdis.o
     73 	$(AR) -rc $@ $?
     74 	$(RANLIB) $@
     75 
     76 libsdis.o: $(OBJ)
     77 	$(LD) -r $(OBJ) -o $@
     78 	$(OBJCOPY) $(OCPFLAGS) $@
     79 
     80 .config: config.mk
     81 	@if [ "$(DISTRIB_PARALLELISM)" = "MPI" ]; then \
     82 	  if ! $(PKG_CONFIG) --atleast-version $(MPI_VERSION) $(MPI_PC); then \
     83 	    echo "$(MPI_PC) $(MPI_VERSION) not found" >&2; exit 1; fi; fi
     84 	@if ! $(PKG_CONFIG) --atleast-version $(RSYS_VERSION) rsys; then \
     85 	  echo "rsys $(RSYS_VERSION) not found" >&2; exit 1; fi
     86 	@if ! $(PKG_CONFIG) --atleast-version $(S2D_VERSION) s2d; then \
     87 	  echo "s2d $(S2D_VERSION) not found" >&2; exit 1; fi
     88 	@if ! $(PKG_CONFIG) --atleast-version $(S3D_VERSION) s3d; then \
     89 	  echo "s3d $(S3D_VERSION) not found" >&2; exit 1; fi
     90 	@if ! $(PKG_CONFIG) --atleast-version $(SENC2D_VERSION) senc2d; then \
     91 	  echo "senc2d $(SENC2D_VERSION) not found" >&2; exit 1; fi
     92 	@if ! $(PKG_CONFIG) --atleast-version $(SENC3D_VERSION) senc3d; then \
     93 	  echo "senc3d $(SENC3D_VERSION) not found" >&2; exit 1; fi
     94 	@if ! $(PKG_CONFIG) --atleast-version $(SSP_VERSION) star-sp; then \
     95 	  echo "star-sp $(SSP_VERSION) not found" >&2; exit 1; fi
     96 	@if ! $(PKG_CONFIG) --atleast-version $(SWF_VERSION) swf; then \
     97 	  echo "swf $(SWF_VERSION) not found" >&2; exit 1; fi
     98 	@echo "config done" > $@
     99 
    100 .SUFFIXES: .c .d .o
    101 .c.d:
    102 	@$(CC) $(CFLAGS_SO) $(DPDC_CFLAGS) $($(DISTRIB_PARALLELISM)_DEF) -MM -MT "$(@:.d=.o) $@" $< -MF $@
    103 
    104 .c.o:
    105 	$(CC) $(CFLAGS_SO) $(DPDC_CFLAGS) -DSDIS_SHARED_BUILD $($(DISTRIB_PARALLELISM)_DEF) -c $< -o $@
    106 
    107 ################################################################################
    108 # Installation
    109 ################################################################################
    110 PKG_MPI =, $(MPI_PC) >= $(MPI_VERSION)
    111 
    112 pkg:
    113 	sed -e 's#@PREFIX@#$(PREFIX)#g'\
    114 	    -e 's#@VERSION@#$(VERSION)#g'\
    115 	    -e 's#@RSYS_VERSION@#$(RSYS_VERSION)#g'\
    116 	    -e 's#@S2D_VERSION@#$(S2D_VERSION)#g'\
    117 	    -e 's#@S3D_VERSION@#$(S3D_VERSION)#g'\
    118 	    -e 's#@SENC2D_VERSION@#$(SENC2D_VERSION)#g'\
    119 	    -e 's#@SENC3D_VERSION@#$(SENC3D_VERSION)#g'\
    120 	    -e 's#@SSP_VERSION@#$(SSP_VERSION)#g'\
    121 	    -e 's#@SWF_VERSION@#$(SWF_VERSION)#g'\
    122 	    -e 's#@MPI@#$(PKG_$(DISTRIB_PARALLELISM))#g'\
    123 	    sdis.pc.in > sdis.pc
    124 
    125 sdis-local.pc: sdis.pc.in config.mk
    126 	sed -e '1d'\
    127 	    -e 's#^includedir=.*#includedir=./src/#'\
    128 	    -e 's#^libdir=.*#libdir=./#'\
    129 	    -e 's#@RSYS_VERSION@#$(RSYS_VERSION)#g'\
    130 	    -e 's#@S2D_VERSION@#$(S2D_VERSION)#g'\
    131 	    -e 's#@S3D_VERSION@#$(S3D_VERSION)#g'\
    132 	    -e 's#@SENC2D_VERSION@#$(SENC2D_VERSION)#g'\
    133 	    -e 's#@SENC3D_VERSION@#$(SENC3D_VERSION)#g'\
    134 	    -e 's#@SSP_VERSION@#$(SSP_VERSION)#g'\
    135 	    -e 's#@SWF_VERSION@#$(SWF_VERSION)#g'\
    136 	    -e 's#@MPI@#$(PKG_$(DISTRIB_PARALLELISM))#g'\
    137 	    sdis.pc.in > $@
    138 
    139 src/sdis_version.h: src/sdis_version.h.in config.mk
    140 	sed -e 's#@VERSION_MAJOR@#$(VERSION_MAJOR)#g' \
    141 	    -e 's#@VERSION_MINOR@#$(VERSION_MINOR)#g' \
    142 	    -e 's#@VERSION_PATCH@#$(VERSION_PATCH)#g' \
    143 	    src/sdis_version.h.in > $@
    144 
    145 install: build_library pkg src/sdis_version.h
    146 	@$(SHELL) make.sh install "$(DESTDIR)$(PREFIX)/lib" $(LIBNAME)
    147 	@$(SHELL) make.sh install "$(DESTDIR)$(PREFIX)/lib/pkgconfig" sdis.pc
    148 	@$(SHELL) make.sh install "$(DESTDIR)$(PREFIX)/include/" src/sdis.h
    149 	@$(SHELL) make.sh install "$(DESTDIR)$(PREFIX)/include/" src/sdis_version.h
    150 	@$(SHELL) make.sh install "$(DESTDIR)$(PREFIX)/share/doc/stardis-solver" \
    151 	COPYING README.md
    152 
    153 uninstall:
    154 	rm -f "$(DESTDIR)$(PREFIX)/lib/$(LIBNAME)"
    155 	rm -f "$(DESTDIR)$(PREFIX)/lib/pkgconfig/sdis.pc"
    156 	rm -f "$(DESTDIR)$(PREFIX)/share/doc/stardis-solver/COPYING"
    157 	rm -f "$(DESTDIR)$(PREFIX)/share/doc/stardis-solver/README.md"
    158 	rm -f "$(DESTDIR)$(PREFIX)/include/sdis.h"
    159 	rm -f "$(DESTDIR)$(PREFIX)/include/sdis_version.h"
    160 
    161 ################################################################################
    162 # Miscellaneous targets
    163 ################################################################################
    164 all: build_library build_tests
    165 
    166 clean: clean_test
    167 	rm -f $(OBJ) $(TEST_OBJ) $(LIBNAME)
    168 	rm -f .config .config_test .test libsdis.o sdis.pc sdis-local.pc
    169 
    170 distclean: clean
    171 	rm -f $(DEP) $(TEST_DEP)
    172 
    173 lint:
    174 	shellcheck -o all make.sh
    175 
    176 ################################################################################
    177 # Tests
    178 ################################################################################
    179 TEST_SRC =\
    180  src/test_sdis_camera.c\
    181  src/test_sdis_conducto_radiative.c\
    182  src/test_sdis_conducto_radiative_2d.c\
    183  src/test_sdis_contact_resistance.c\
    184  src/test_sdis_contact_resistance_2.c\
    185  src/test_sdis_convection.c\
    186  src/test_sdis_convection_non_uniform.c\
    187  src/test_sdis_data.c\
    188  src/test_sdis_draw_external_flux.c\
    189  src/test_sdis_enclosure_limit_conditions.c\
    190  src/test_sdis_external_flux_with_diffuse_radiance.c\
    191  src/test_sdis_flux.c\
    192  src/test_sdis_flux2.c\
    193  src/test_sdis_flux_with_h.c\
    194  src/test_sdis_interface.c\
    195  src/test_sdis_medium.c\
    196  src/test_sdis_picard.c\
    197  src/test_sdis_primkey.c\
    198  src/test_sdis_primkey_2d.c\
    199  src/test_sdis_radiative_env.c\
    200  src/test_sdis_scene.c\
    201  src/test_sdis_solid_random_walk_robustness.c\
    202  src/test_sdis_solve_probe.c\
    203  src/test_sdis_solve_probe3.c\
    204  src/test_sdis_solve_probe_2d.c\
    205  src/test_sdis_solve_probe2_2d.c\
    206  src/test_sdis_solve_probe3_2d.c\
    207  src/test_sdis_source.c\
    208  src/test_sdis_transcient.c\
    209  src/test_sdis_unsteady.c\
    210  src/test_sdis_unsteady_1d.c\
    211  src/test_sdis_unsteady_analytic_profile.c\
    212  src/test_sdis_unsteady_analytic_profile_2d.c\
    213  src/test_sdis_unsteady_atm.c\
    214  src/test_sdis_volumic_power.c\
    215  src/test_sdis_volumic_power4.c
    216 TEST_SRC_LONG =\
    217  src/test_sdis_volumic_power2.c\
    218  src/test_sdis_volumic_power2_2d.c\
    219  src/test_sdis_volumic_power3_2d.c
    220 TEST_SRC_MPI =\
    221  src/test_sdis.c\
    222  src/test_sdis_compute_power.c\
    223  src/test_sdis_custom_solid_path_sampling.c\
    224  src/test_sdis_custom_solid_path_sampling_2d.c\
    225  src/test_sdis_device.c\
    226  src/test_sdis_external_flux.c\
    227  src/test_sdis_solve_camera.c\
    228  src/test_sdis_solve_medium.c\
    229  src/test_sdis_solve_medium_2d.c\
    230  src/test_sdis_solve_boundary.c\
    231  src/test_sdis_solve_boundary_flux.c\
    232  src/test_sdis_solve_probe2.c\
    233  src/test_sdis_solve_probe_list.c\
    234  src/test_sdis_solve_probe_boundary_list.c
    235 TEST_OBJ =\
    236  $(TEST_SRC:.c=.o)\
    237  $(TEST_SRC_MPI:.c=.o)\
    238  $(TEST_SRC_LONG:.c=.o)\
    239  src/test_sdis_utils.o
    240 TEST_DEP =\
    241  $(TEST_SRC:.c=.d)\
    242  $(TEST_SRC_MPI:.c=.d)\
    243  $(TEST_SRC_LONG:.c=.d)\
    244  src/test_sdis_utils.d
    245 
    246 PKG_CONFIG_LOCAL = PKG_CONFIG_PATH="./:$${PKG_CONFIG_PATH}" $(PKG_CONFIG)
    247 SDIS_CFLAGS = $$($(PKG_CONFIG_LOCAL) $(PCFLAGS) --cflags sdis-local.pc)
    248 SDIS_LIBS = $$($(PKG_CONFIG_LOCAL) $(PCFLAGS) --libs sdis-local.pc)
    249 
    250 # Regular Compiler and linker flags
    251 TEST_CFLAGS = $(CFLAGS_EXE) $(SDIS_CFLAGS) $(RSYS_CFLAGS)
    252 TEST_LIBS = src/test_sdis_utils.o $(LDFLAGS_EXE) $(SDIS_LIBS) $(RSYS_LIBS) -lm
    253 
    254 # Compiler and linker flags for MPI tests
    255 TEST_CFLAGS_MPI =\
    256  $(TEST_CFLAGS)\
    257  $($(DISTRIB_PARALLELISM)_CFLAGS)\
    258  $($(DISTRIB_PARALLELISM)_DEF)
    259 TEST_LIBS_MPI =\
    260  $(TEST_LIBS)\
    261  $($(DISTRIB_PARALLELISM)_LIBS)
    262 
    263 build_tests: .config_test build_library $(TEST_DEP) src/test_sdis_utils.d .test
    264 	@$(MAKE) -fMakefile -f.test -fsrc/test_sdis_utils.d \
    265 	$$(for i in $(TEST_DEP); do echo -f"$${i}"; done) \
    266 	test_bin
    267 
    268 .config_test: config.mk
    269 	@if ! $(PKG_CONFIG) --atleast-version $(S3DUT_VERSION) s3dut; then \
    270 	  echo "s3dut $(S3DUT_VERSION) not found" >&2; exit 1; fi
    271 	@echo "config done" > $@
    272 
    273 test: build_tests
    274 	@$(SHELL) make.sh run_test $(TEST_SRC)
    275 	@if [ "$(DISTRIB_PARALLELISM)" != "MPI" ]; then \
    276 	  $(SHELL) make.sh run_test $(TEST_SRC_MPI); \
    277 	else \
    278 	  $(SHELL) make.sh run_test_mpi $(TEST_SRC_MPI); \
    279 	fi
    280 
    281 test_all: test
    282 	@$(SHELL) make_sh run_test $(TEST_SRC_LONG)
    283 
    284 .test: Makefile
    285 	@$(SHELL) make.sh config_test $(TEST_SRC) $(TEST_SRC_MPI) $(TEST_SRC_LONG) > $@
    286 
    287 clean_test:
    288 	@$(SHELL) make.sh clean_test $(TEST_SRC) $(TEST_SRC_MPI) $(TEST_SRC_LONG)
    289 	rm -f super_shape_2d.obj paths_wos_2d.vtk paths_delta_sphere_2d.vtk
    290 	rm -f super_shape_3d.obj paths_wos_3d.vtk paths_delta_sphere_3d.vtk
    291 	rm -f rng_state
    292 
    293 ################################################################################
    294 # Regular tests
    295 ################################################################################
    296 src/test_sdis_camera.d \
    297 src/test_sdis_conducto_radiative.d \
    298 src/test_sdis_conducto_radiative_2d.d \
    299 src/test_sdis_contact_resistance.d \
    300 src/test_sdis_contact_resistance_2.d \
    301 src/test_sdis_convection.d \
    302 src/test_sdis_convection_non_uniform.d \
    303 src/test_sdis_data.d \
    304 src/test_sdis_enclosure_limit_conditions.d \
    305 src/test_sdis_flux.d \
    306 src/test_sdis_flux2.d \
    307 src/test_sdis_flux_with_h.d \
    308 src/test_sdis_interface.d \
    309 src/test_sdis_medium.d \
    310 src/test_sdis_picard.d \
    311 src/test_sdis_radiative_env.d \
    312 src/test_sdis_solve_probe.d \
    313 src/test_sdis_solve_probe_2d.d \
    314 src/test_sdis_solve_probe2_2d.d \
    315 src/test_sdis_solve_probe3_2d \
    316 src/test_sdis_source.d \
    317 src/test_sdis_transcient.d \
    318 src/test_sdis_unsteady.d \
    319 src/test_sdis_unsteady_1d.d \
    320 src/test_sdis_unsteady_analytic_profile_2d.d \
    321 src/test_sdis_unsteady_atm.d \
    322 src/test_sdis_utils.d \
    323 src/test_sdis_volumic_power.d \
    324 src/test_sdis_volumic_power2.d \
    325 src/test_sdis_volumic_power2_2d.d \
    326 src/test_sdis_volumic_power3_2d.d \
    327 src/test_sdis_volumic_power4.d \
    328 : config.mk sdis-local.pc
    329 	@$(CC) $(TEST_CFLAGS) -MM -MT "$(@:.d=.o) $@" $(@:.d=.c) -MF $@
    330 
    331 src/test_sdis_camera.o \
    332 src/test_sdis_conducto_radiative.o \
    333 src/test_sdis_conducto_radiative_2d.o \
    334 src/test_sdis_contact_resistance.o \
    335 src/test_sdis_contact_resistance_2.o \
    336 src/test_sdis_convection.o \
    337 src/test_sdis_convection_non_uniform.o \
    338 src/test_sdis_data.o \
    339 src/test_sdis_enclosure_limit_conditions.o \
    340 src/test_sdis_flux.o \
    341 src/test_sdis_flux2.o \
    342 src/test_sdis_flux_with_h.o \
    343 src/test_sdis_interface.o \
    344 src/test_sdis_medium.o \
    345 src/test_sdis_picard.o \
    346 src/test_sdis_radiative_env.o \
    347 src/test_sdis_solve_probe.o \
    348 src/test_sdis_solve_probe_2d.o \
    349 src/test_sdis_solve_probe2_2d.o \
    350 src/test_sdis_solve_probe3_2d.o \
    351 src/test_sdis_source.o \
    352 src/test_sdis_transcient.o \
    353 src/test_sdis_unsteady.o \
    354 src/test_sdis_unsteady_1d.o \
    355 src/test_sdis_unsteady_analytic_profile_2d.o \
    356 src/test_sdis_unsteady_atm.o \
    357 src/test_sdis_utils.o \
    358 src/test_sdis_volumic_power.o \
    359 src/test_sdis_volumic_power2.o \
    360 src/test_sdis_volumic_power2_2d.o \
    361 src/test_sdis_volumic_power3_2d.o \
    362 src/test_sdis_volumic_power4.o \
    363 : config.mk sdis-local.pc
    364 	$(CC) $(TEST_CFLAGS) -c $(@:.o=.c) -o $@
    365 
    366 test_sdis_camera \
    367 test_sdis_conducto_radiative \
    368 test_sdis_conducto_radiative_2d \
    369 test_sdis_contact_resistance \
    370 test_sdis_contact_resistance_2 \
    371 test_sdis_convection \
    372 test_sdis_convection_non_uniform \
    373 test_sdis_data \
    374 test_sdis_enclosure_limit_conditions \
    375 test_sdis_flux \
    376 test_sdis_flux2 \
    377 test_sdis_flux_with_h \
    378 test_sdis_interface \
    379 test_sdis_medium \
    380 test_sdis_picard \
    381 test_sdis_radiative_env \
    382 test_sdis_solve_probe \
    383 test_sdis_solve_probe_2d \
    384 test_sdis_solve_probe2_2d \
    385 test_sdis_solve_probe3_2d \
    386 test_sdis_source \
    387 test_sdis_transcient \
    388 test_sdis_unsteady \
    389 test_sdis_unsteady_1d \
    390 test_sdis_unsteady_analytic_profile_2d \
    391 test_sdis_unsteady_atm \
    392 test_sdis_volumic_power \
    393 test_sdis_volumic_power2 \
    394 test_sdis_volumic_power2_2d \
    395 test_sdis_volumic_power3_2d \
    396 test_sdis_volumic_power4 \
    397 : config.mk sdis-local.pc $(LIBNAME) src/test_sdis_utils.o
    398 	$(CC) $(TEST_CFLAGS) -o $@ src/$@.o $(TEST_LIBS)
    399 
    400 ################################################################################
    401 # Tests based on Star-3DUT
    402 ################################################################################
    403 src/test_sdis_draw_external_flux.d \
    404 src/test_sdis_external_flux_with_diffuse_radiance.d \
    405 src/test_sdis_primkey.d \
    406 src/test_sdis_solid_random_walk_robustness.d \
    407 src/test_sdis_solve_probe3.d \
    408 src/test_sdis_unsteady_analytic_profile.d \
    409 : config.mk sdis-local.pc
    410 	@$(CC) $(TEST_CFLAGS) $(S3DUT_CFLAGS) -MM -MT "$(@:.d=.o) $@" $(@:.d=.c) -MF $@
    411 
    412 src/test_sdis_draw_external_flux.o \
    413 src/test_sdis_external_flux_with_diffuse_radiance.o \
    414 src/test_sdis_primkey.o \
    415 src/test_sdis_solid_random_walk_robustness.o \
    416 src/test_sdis_solve_probe3.o \
    417 src/test_sdis_unsteady_analytic_profile.o \
    418 : config.mk sdis-local.pc
    419 	$(CC) $(TEST_CFLAGS) $(S3DUT_CFLAGS) -c $(@:.o=.c) -o $@
    420 
    421 test_sdis_draw_external_flux \
    422 test_sdis_external_flux_with_diffuse_radiance \
    423 test_sdis_primkey \
    424 test_sdis_solid_random_walk_robustness \
    425 test_sdis_solve_probe3 \
    426 test_sdis_unsteady_analytic_profile \
    427 : config.mk sdis-local.pc $(LIBNAME) src/test_sdis_utils.o
    428 	$(CC) $(TEST_CFLAGS) $(S3DUT_CFLAGS) -o $@ src/$@.o $(TEST_LIBS) $(S3DUT_LIBS)
    429 
    430 ################################################################################
    431 # Test based on Star-2D
    432 ################################################################################
    433 src/test_sdis_primkey_2d.d \
    434 : config.mk sdis-local.pc
    435 	@$(CC) $(TEST_CFLAGS) $(S2D_CFLAGS) -MM -MT "$(@:.d=.o) $@" $(@:.d=.c) -MF $@
    436 
    437 src/test_sdis_primkey_2d.o \
    438 : config.mk sdis-local.pc
    439 	$(CC) $(TEST_CFLAGS) $(S2D_CFLAGS) -c $(@:.o=.c) -o $@
    440 
    441 test_sdis_primkey_2d \
    442 : config.mk sdis-local.pc $(LIBNAME) src/test_sdis_utils.o
    443 	$(CC) $(TEST_CFLAGS) $(S2D_CFLAGS) -o $@ src/$@.o $(TEST_LIBS) $(S2D_LIBS)
    444 
    445 ################################################################################
    446 # Test based on Star-2D with (optional) MPI support
    447 ################################################################################
    448 src/test_sdis_custom_solid_path_sampling_2d.d \
    449 : config.mk sdis-local.pc
    450 	@$(CC) $(TEST_CFLAGS_MPI) $(S2D_CFLAGS) -MM -MT "$(@:.d=.o) $@" $(@:.d=.c) -MF $@
    451 
    452 src/test_sdis_custom_solid_path_sampling_2d.o \
    453 : config.mk sdis-local.pc
    454 	$(CC) $(TEST_CFLAGS_MPI) $(S2D_CFLAGS) -c $(@:.o=.c) -o $@
    455 
    456 test_sdis_custom_solid_path_sampling_2d \
    457 : config.mk sdis-local.pc $(LIBNAME) src/test_sdis_utils.o
    458 	$(CC) $(TEST_CFLAGS_MPI) $(S2D_CFLAGS) -o $@ src/$@.o $(TEST_LIBS_MPI) $(S2D_LIBS)
    459 
    460 ################################################################################
    461 # Tests based on Star-Enclosures-<2|3>D
    462 ################################################################################
    463 src/test_sdis_scene.d \
    464 : config.mk sdis-local.pc
    465 	@$(CC) $(TEST_CFLAGS) $(SENC2D_CFLAGS) $(SENC3D_CFLAGS) -MM -MT "$(@:.d=.o) $@" $(@:.d=.c) -MF $@
    466 
    467 src/test_sdis_scene.o \
    468 : config.mk sdis-local.pc
    469 	$(CC) $(TEST_CFLAGS) $(SENC2D_CFLAGS) $(SENC3D_CFLAGS) -c $(@:.o=.c) -o $@
    470 
    471 test_sdis_scene \
    472 : config.mk sdis-local.pc $(LIBNAME) src/test_sdis_utils.o
    473 	$(CC) $(TEST_CFLAGS) $(SENC2D_CFLAGS) $(SENC3D_CFLAGS) -o $@ src/$@.o $(TEST_LIBS) $(SENC2D_LIBS) $(SENC3D_LIBS)
    474 
    475 ################################################################################
    476 # Tests with (optional) MPI support
    477 ################################################################################
    478 src/test_sdis.d \
    479 src/test_sdis_device.d \
    480 src/test_sdis_external_flux.d \
    481 src/test_sdis_solve_medium_2d.d \
    482 : config.mk sdis-local.pc
    483 	@$(CC) $(TEST_CFLAGS_MPI) -MM -MT "$(@:.d=.o) $@" $(@:.d=.c) -MF $@
    484 
    485 src/test_sdis.o \
    486 src/test_sdis_device.o \
    487 src/test_sdis_external_flux.o \
    488 src/test_sdis_solve_medium_2d.o \
    489 : config.mk sdis-local.pc
    490 	$(CC) $(TEST_CFLAGS_MPI) -c $(@:.o=.c) -o $@
    491 
    492 test_sdis \
    493 test_sdis_device \
    494 test_sdis_external_flux \
    495 test_sdis_solve_medium_2d \
    496 : config.mk sdis-local.pc $(LIBNAME) src/test_sdis_utils.o
    497 	$(CC) $(TEST_CFLAGS_MPI) -o $@ src/$@.o $(TEST_LIBS_MPI)
    498 
    499 ################################################################################
    500 # Tests based on Star-3DUT with (optional) MPI support
    501 ################################################################################
    502 src/test_sdis_compute_power.d \
    503 src/test_sdis_solve_camera.d \
    504 src/test_sdis_solve_medium.d \
    505 src/test_sdis_solve_probe_boundary_list.d \
    506 : config.mk sdis-local.pc
    507 	@$(CC) $(TEST_CFLAGS_MPI) $(S3DUT_CFLAGS) -MM -MT "$(@:.d=.o) $@" $(@:.d=.c) -MF $@
    508 
    509 src/test_sdis_compute_power.o \
    510 src/test_sdis_solve_camera.o \
    511 src/test_sdis_solve_medium.o \
    512 src/test_sdis_solve_probe_boundary_list.o \
    513 : config.mk sdis-local.pc
    514 	$(CC) $(TEST_CFLAGS_MPI) $(S3DUT_CFLAGS) -c $(@:.o=.c) -o $@
    515 
    516 test_sdis_compute_power \
    517 test_sdis_solve_camera \
    518 test_sdis_solve_medium \
    519 test_sdis_solve_probe_boundary_list \
    520 : config.mk sdis-local.pc $(LIBNAME) src/test_sdis_utils.o
    521 	$(CC) $(TEST_CFLAGS_MPI) $(S3DUT_CFLAGS) -o $@ src/$@.o $(TEST_LIBS_MPI) $(S3DUT_LIBS)
    522 
    523 ################################################################################
    524 # Tests based on Star-3D, Star-3DUT and Star-SP with (optional) MPI support
    525 ################################################################################
    526 src/test_sdis_custom_solid_path_sampling.d \
    527 src/test_sdis_solve_probe_list.d \
    528 : config.mk sdis-local.pc
    529 	@$(CC) $(TEST_CFLAGS_MPI) $(S3D_CFLAGS) $(S3DUT_CFLAGS) $(SSP_CFLAGS) \
    530 	-MM -MT "$(@:.d=.o) $@" $(@:.d=.c) -MF $@
    531 
    532 src/test_sdis_custom_solid_path_sampling.o \
    533 src/test_sdis_solve_probe_list.o \
    534 : config.mk sdis-local.pc
    535 	$(CC) $(TEST_CFLAGS_MPI) $(S3D_CFLAGS) $(S3DUT_CFLAGS) $(SSP_CFLAGS) -c $(@:.o=.c) -o $@
    536 
    537 test_sdis_custom_solid_path_sampling \
    538 test_sdis_solve_probe_list \
    539 : config.mk sdis-local.pc $(LIBNAME) src/test_sdis_utils.o
    540 	$(CC) $(TEST_CFLAGS_MPI) $(S3D_CFLAGS) $(S3DUT_CFLAGS) $(SSP_CFLAGS) \
    541 	-o $@ src/$@.o $(TEST_LIBS_MPI) $(S3D_LIBS) $(S3DUT_LIBS) $(SSP_CFLAGS)
    542 
    543 ################################################################################
    544 # Tests based on Star-SP with (optional) MPI support
    545 ################################################################################
    546 src/test_sdis_solve_boundary.d \
    547 src/test_sdis_solve_boundary_flux.d \
    548 src/test_sdis_solve_probe2.d \
    549 : config.mk sdis-local.pc
    550 	@$(CC) $(TEST_CFLAGS_MPI) $(SSP_CFLAGS) -MM -MT "$(@:.d=.o) $@" $(@:.d=.c) -MF $@
    551 
    552 src/test_sdis_solve_boundary.o \
    553 src/test_sdis_solve_boundary_flux.o \
    554 src/test_sdis_solve_probe2.o \
    555 : config.mk sdis-local.pc
    556 	$(CC) $(TEST_CFLAGS_MPI) $(SSP_CFLAGS) -c $(@:.o=.c) -o $@
    557 
    558 test_sdis_solve_boundary \
    559 test_sdis_solve_boundary_flux \
    560 test_sdis_solve_probe2 \
    561 : config.mk sdis-local.pc $(LIBNAME) src/test_sdis_utils.o
    562 	$(CC) $(TEST_CFLAGS_MPI) $(SSP_CFLAGS) -o $@ src/$@.o $(TEST_LIBS_MPI) $(SSP_LIBS)