Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/tokuhirom/p5-module-install-forc

M::I extension for standalone C program/library
https://github.com/tokuhirom/p5-module-install-forc

Last synced: about 1 month ago
JSON representation

M::I extension for standalone C program/library

Awesome Lists containing this project

README

        

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"]);

WriteMakefile();

# 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?

WriteHeaderForC("config.h")
Write config.h, contains HAVE_* style definitions generated by
$env->have_header, $env->have_library.

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

mattn(win32 port)

SEE ALSO
This module is inspired by SCons().

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