The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

NAME

Module::Install::ForC - the power of M::I for C programs

SYNOPSIS

    # in your Makefile.PL
    use inc::Module::Install;

    my $env = env_for_c(CPPPATH => ['picoev/', 'picohttpparser/']);
    $env->program('testechoclient' => ["testechoclient.c"]);

    WriteMakefileForC();

    # then, you will get the Makefile:
    all: testechoclient

    clean:
        rm testechoclient testechoclient.o
        rm Makefile

    testechoclient: testechoclient.o
        cc   -fstack-protector -L/usr/local/lib -o testechoclient testechoclient.o

    testechoclient.o: testechoclient.c
        cc -DDEBUGGING -fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I picoev/ -I picohttpparser/ -c -o testechoclient.o testechoclient.c

DESCRIPTION

Module::Install::ForC is a extension library for Module::Install.

This module provides some useful functions for writing C/C++ programs/libraries, doesn't depend to Perl.

M::Install is useful for Perl/XS programming, but this module provides M::I power for C/C++ programs!You can use this module as replacement of autoconf/automake for easy case.

NOTE

This is a early BETA release! API will change later.

FUNCTIONS

is_linux()
is_mac()
is_win32()

Is this the OS or not?

WriteMakefileForC()

Write makefile in M::I::ForC style.

my $env = env_for_c(CPPPATH => ['picoev/', 'picohttpparser/']);

env() returns the instance of M::I::ForC::Env.

$env contains the build environment variables.The key name is a generic value for C.If you want to know about key names, see also Module::Install::ForC::Env.

FAQ

What is supported platform?

Currently GNU/Linux, OpenSolaris, Mac OSX, and MSWin32.

AUTHOR

Tokuhiro Matsuno <tokuhirom slkjfd gmail.com>

mattn(win32 port)

SEE ALSO

This module is inspired by SCons(http://www.scons.org/).

LICENSE

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.