--- C.pm_orig 2021-12-20 22:11:48 +1100
+++ C.pm 2022-06-27 19:27:27 +1000
@@ -177,6 +177,10 @@
$o->{ILSM}{XS}{PREFIX} = $value;
next;
}
+ if($key eq 'OBJECT') {
+ $o->add_string($o->{ILSM}{MAKEFILE}, $key, $value);
+ next;
+ }
if ($key eq 'FILTERS') {
next if $value eq '1' or $value eq '0'; # ignore ENABLE, DISABLE
$value = [$value] unless ref($value) eq 'ARRAY';
####
use warnings;
use Inline C => Config =>
BUILD_NOISY => 1,
OBJECT => '$(O_FILES)',
;
use Inline C =><<'EOC';
#include "bar.h"
#include "baz.h"
void foo(int i) {
printf("bar: %d\n", bar(i));
printf("baz: %d\n", baz(i));
}
EOC
foo(42);
##
##
#include "bar.h"
int bar (int in) {
return in;
}
##
##
#include "baz.h"
int baz (int in) {
return in + 1;
}
##
##
bar: 42
baz: 43