aboutsummaryrefslogtreecommitdiff
path: root/src/fpm_backend.f90
diff options
context:
space:
mode:
Diffstat (limited to 'src/fpm_backend.f90')
-rw-r--r--src/fpm_backend.f908
1 files changed, 6 insertions, 2 deletions
diff --git a/src/fpm_backend.f90 b/src/fpm_backend.f90
index 74cef61..be4c4c9 100644
--- a/src/fpm_backend.f90
+++ b/src/fpm_backend.f90
@@ -30,8 +30,8 @@ module fpm_backend
use fpm_environment, only: run
use fpm_filesystem, only: dirname, join_path, exists, mkdir
use fpm_model, only: fpm_model_t
-use fpm_targets, only: build_target_t, build_target_ptr, &
- FPM_TARGET_OBJECT, FPM_TARGET_ARCHIVE, FPM_TARGET_EXECUTABLE
+use fpm_targets, only: build_target_t, build_target_ptr, FPM_TARGET_OBJECT, &
+ FPM_TARGET_C_OBJECT, FPM_TARGET_ARCHIVE, FPM_TARGET_EXECUTABLE
use fpm_strings, only: string_cat
@@ -241,6 +241,10 @@ subroutine build_target(model,target)
call run(model%fortran_compiler//" -c " // target%source%file_name // target%compile_flags &
// " -o " // target%output_file)
+ case (FPM_TARGET_C_OBJECT)
+ call run(model%c_compiler//" -c " // target%source%file_name &
+ // " -o " // target%output_file)
+
case (FPM_TARGET_EXECUTABLE)
call run(model%fortran_compiler// " " // target%compile_flags &