This commit is contained in:
Stefan Bühler 2008-07-11 22:38:17 +02:00
rodič 802a330059
revize fd3652089f
9 změnil soubory, kde provedl 83 přidání a 1 odebrání

8
.gitignore vendorováno Normal file
Zobrazit soubor

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

Zobrazit soubor

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

19
ragel.py Normal file
Zobrazit soubor

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

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

6
src/control.h Normal file
Zobrazit soubor

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

4
src/main.c Normal file
Zobrazit soubor

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

16
src/wscript Normal file
Zobrazit soubor

@ -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ární
waf vendorováno Executable file

Binární soubor nebyl zobrazen.

27
wscript Normal file
Zobrazit soubor

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