diff --git a/SConscript b/SConscript index 9e5520e..6c0d359 100644 --- a/SConscript +++ b/SConscript @@ -5,14 +5,8 @@ from building import * cwd = GetCurrentDir() # init src and inc vars -src = [] -inc = [] - -# add getparse common include -inc = inc + [cwd] - -# add getparse basic code -src = src + Glob('./*.c') +src = Glob('*.c') +inc = [cwd] # add group to IDE project group = DefineGroup('optparse', src, depend = ['PKG_USING_OPTPARSE'], CPPPATH = inc) diff --git a/example/SConscript b/example/SConscript index cc97356..dbd511a 100644 --- a/example/SConscript +++ b/example/SConscript @@ -1,20 +1,7 @@ -import os from building import * -# get current dir path -cwd = GetCurrentDir() +src = ['optparse_demo.c'] -# init src and inc vars -src = [] -inc = [] - -# add optparse common include -inc = inc + [cwd] - -# add optparse basic code -src = src + Glob('./*.c') - -# add group to IDE project -objs = DefineGroup('optparse', src, depend = ['OPTPARSE_USING_DEMO'], CPPPATH = inc) +objs = DefineGroup('optparse', src, depend = ['OPTPARSE_USING_DEMO']) Return('objs') diff --git a/example/optparse_demo.c b/example/optparse_demo.c index 48d0e6d..c387321 100644 --- a/example/optparse_demo.c +++ b/example/optparse_demo.c @@ -1,5 +1,5 @@ -#include "optparse.h" -#include "finsh.h" +#include +#include int optparse_short_test(int argc, char **argv) {