master
Stefan Bühler 15 years ago
parent 802a330059
commit fd3652089f
  1. 8
      .gitignore
  2. 2
      icfp08/bin/package
  3. 19
      ragel.py
  4. 2
      src/control.c
  5. 6
      src/control.h
  6. 4
      src/main.c
  7. 16
      src/wscript
  8. BIN
      waf
  9. 27
      wscript

8
.gitignore vendored

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

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

@ -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"')

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

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

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

@ -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

Binary file not shown.

@ -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')
Loading…
Cancel
Save