From f28ac3e31cb0e5c558a4fdb4ce5f461ce1c83ea4 Mon Sep 17 00:00:00 2001 From: LKedward Date: Thu, 8 Apr 2021 15:26:29 +0100 Subject: Separate target type for c objects --- src/fpm_backend.f90 | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'src/fpm_backend.f90') 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 & -- cgit v1.2.3 From f85a458f7ab35ee53ab188b3679e05fae5e5819c Mon Sep 17 00:00:00 2001 From: LKedward Date: Thu, 8 Apr 2021 15:40:33 +0100 Subject: Fix include flags for c objects --- src/fpm_backend.f90 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/fpm_backend.f90') diff --git a/src/fpm_backend.f90 b/src/fpm_backend.f90 index be4c4c9..8c4cf40 100644 --- a/src/fpm_backend.f90 +++ b/src/fpm_backend.f90 @@ -242,7 +242,7 @@ subroutine build_target(model,target) // " -o " // target%output_file) case (FPM_TARGET_C_OBJECT) - call run(model%c_compiler//" -c " // target%source%file_name & + call run(model%c_compiler//" -c " // target%source%file_name // target%compile_flags & // " -o " // target%output_file) case (FPM_TARGET_EXECUTABLE) -- cgit v1.2.3