7

In this question about compiling c code in a Module::Build module, it was suggested to use c_source to specify the location of the c/c++ source code.

This configuration option results in compiling the source to object files, and adding the directory to the linker's search path.

I would like to know if a similar configuration can be achieved, where all .c files are compiled to standalone executables, and installed next to the bin/ scripts.

Community
  • 1
  • 1
ajwood
  • 18,227
  • 15
  • 61
  • 104
  • Module::Build has a scripts option for specifying the paths of scripts. Why not put the path of the compiled executable there? – Rob Oct 21 '14 at 16:11
  • Because the source hasn't been compiled yet.. The module contains perl scripts, perl libraries a c _*source*_ code. The build operation should compile and install the c executables – ajwood Oct 21 '14 at 19:55

1 Answers1

1

You could check out the Alien:: set of modules, which do a superset of what you want I think. It looks like https://metacpan.org/pod/Alien::Base::Authoring is a good place to start.

awwaiid
  • 176
  • 1
  • 3