This commit is contained in:
Stefan Bühler 2008-07-11 22:38:17 +02:00
parent 802a330059
commit fd3652089f
9 changed files with 83 additions and 1 deletions

8
.gitignore vendored Normal file
View File

@ -0,0 +1,8 @@
.lock-wscript
.waf-*
Doxyfile
build
*.kdev*
*.pyc
*.o
*~

View File

@ -35,4 +35,4 @@ if test "$non_comments" -eq 0 ; then
echo 'NOTE: There are no installation actions for your script' echo 'NOTE: There are no installation actions for your script'
fi fi
exit $status exit $status

19
ragel.py Normal file
View File

@ -0,0 +1,19 @@
#! /usr/bin/env python
# encoding: utf-8
# Thomas Nagy, 2006 (ita)
"Ragel: '.rl' files are converted into .c files using 'ragel': {.rl -> .c -> .o}"
import TaskGen
TaskGen.declare_chain(
name = 'ragel',
action = '${RAGEL} -o ${TGT} ${SRC}',
ext_in = '.rl',
ext_out = '.c',
before = 'c',
)
def detect(conf):
dang = conf.find_program('ragel', var='RAGEL')
if not dang: conf.fatal('cannot find the program "ragel"')

2
src/control.c Normal file
View File

@ -0,0 +1,2 @@
#include "control.h"

6
src/control.h Normal file
View File

@ -0,0 +1,6 @@
#ifndef _CONTROL_H
#define _CONTROL_H
#endif

4
src/main.c Normal file
View File

@ -0,0 +1,4 @@
int main(char **argv, int argc) {
return 0;
}

16
src/wscript Normal file
View File

@ -0,0 +1,16 @@
#! /usr/bin/env python
# encoding: utf-8
# src/wscript
main_source = '''
main.c
control.c
'''
def build(bld):
main = bld.new_task_gen('cc', 'program')
main.name = 'icfp08'
main.source = main_source
main.target = 'icfp08'
main.uselib += ''

BIN
waf vendored Executable file

Binary file not shown.

27
wscript Normal file
View File

@ -0,0 +1,27 @@
#! /usr/bin/env python
# encoding: utf-8
# wscript
VERSION='0.0.1'
APPNAME='icfp08'
srcdir = '.'
blddir = 'build'
def set_options(opt):
opt.tool_options('compiler_cc')
opt.tool_options('ragel', tdir = '.')
def configure(conf):
conf.check_tool('compiler_cc')
conf.check_tool('ragel', tooldir = '.')
common_ccflags = [
'-std=gnu99', '-Wall', '-g', '-Wshadow', '-W', '-pedantic',
# '-fPIC', '-D_GNU_SOURCE',
]
conf.env['CCFLAGS'] += common_ccflags
def build(bld):
bld.add_subdirs('src')