mirror of https://gitlab.com/ita1024/waf.git
playground: add c-objects-stlib-shlib
This commit is contained in:
parent
57f6a272e2
commit
a98f85795f
|
@ -0,0 +1,8 @@
|
||||||
|
|
||||||
|
extern void foo();
|
||||||
|
|
||||||
|
int main()
|
||||||
|
{
|
||||||
|
foo();
|
||||||
|
return 0;
|
||||||
|
}
|
|
@ -0,0 +1,5 @@
|
||||||
|
|
||||||
|
static const int truc=5;
|
||||||
|
|
||||||
|
void foo() { }
|
||||||
|
void _internal() {} /* this one is not gonna be exported by *.def */
|
|
@ -0,0 +1,57 @@
|
||||||
|
#! /usr/bin/env python
|
||||||
|
# encoding: utf-8
|
||||||
|
# Jérôme Carretero, 2013 (zougloub)
|
||||||
|
|
||||||
|
"""
|
||||||
|
Demonstration for building of static+shared libraries.
|
||||||
|
"""
|
||||||
|
|
||||||
|
|
||||||
|
def options(opt):
|
||||||
|
opt.load('compiler_c gnu_dirs')
|
||||||
|
|
||||||
|
def configure(conf):
|
||||||
|
conf.load('compiler_c gnu_dirs')
|
||||||
|
|
||||||
|
def build(bld):
|
||||||
|
|
||||||
|
bld(
|
||||||
|
features='c',
|
||||||
|
source='test_shlib.c',
|
||||||
|
use='cshlib',
|
||||||
|
target='objects-for-shlib',
|
||||||
|
)
|
||||||
|
|
||||||
|
bld(
|
||||||
|
features='c',
|
||||||
|
source='test_shlib.c',
|
||||||
|
target='objects-for-stlib',
|
||||||
|
)
|
||||||
|
|
||||||
|
bld(
|
||||||
|
features='c cshlib',
|
||||||
|
target='something-shared',
|
||||||
|
vnum='1.2.3',
|
||||||
|
use='objects-for-shlib',
|
||||||
|
)
|
||||||
|
|
||||||
|
bld(
|
||||||
|
features='c cstlib',
|
||||||
|
target = 'something-static',
|
||||||
|
use='objects-for-stlib',
|
||||||
|
)
|
||||||
|
|
||||||
|
bld(
|
||||||
|
features='c cprogram',
|
||||||
|
target='exe-shared',
|
||||||
|
source='main.c',
|
||||||
|
use='something-shared',
|
||||||
|
)
|
||||||
|
|
||||||
|
bld(
|
||||||
|
features='c cprogram',
|
||||||
|
target='exe-static',
|
||||||
|
source='main.c',
|
||||||
|
use='something-static',
|
||||||
|
)
|
||||||
|
|
Loading…
Reference in New Issue