The MCE Sandbox project places the C and header files inside the src folder. There is just the one *.c file, everything else placed in *.h files.
.Inline/ Where Inline::C is configured to cache C object file
+s.
bin/
algorithm3.pl Practical sieve based on Algorithm3 from Xuedong Luo
+ [1].
src/
algorithm3.c Inline::C code for algorithm3.pl.
bits.h Utility functions for byte array.
output.h Fast printing of primes to a file descriptor.
sandbox.h Header file, includes bits.h, output.h, sprintull.h.
sprintull.h Fast base10 to string conversion.
typemap Type-map file for Inline::C.
I pass -I${base_dir}/src for Inline C, inside algorithm3.pl
BEGIN {
$ENV{PERL_INLINE_DIRECTORY} = "${base_dir}/.Inline";
mkdir "${base_dir}/.Inline" unless -d "${base_dir}/.Inline";
}
use Inline 'C' => Config =>
CCFLAGSEX => "-I${base_dir}/src -O3 -fomit-frame-pointer",
TYPEMAPS => "${base_dir}/src/typemap",
clean_after_build => 0;
use Inline 'C' => "${base_dir}/src/algorithm3.c";
Later editing a header file requires removing the cache .Inline folder. Inline C does not know to re-compile due to not checking the *.h time stamps.