Skip to content

Commit

Permalink
Merge pull request #5 from mysterywolf/master
Browse files Browse the repository at this point in the history
优化 Sconscript
  • Loading branch information
liu2guang authored Feb 17, 2022
2 parents 2892db0 + 022e719 commit 4722bc8
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 25 deletions.
10 changes: 2 additions & 8 deletions SConscript
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
17 changes: 2 additions & 15 deletions example/SConscript
Original file line number Diff line number Diff line change
@@ -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')
4 changes: 2 additions & 2 deletions example/optparse_demo.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#include "optparse.h"
#include "finsh.h"
#include <optparse.h>
#include <finsh.h>

int optparse_short_test(int argc, char **argv)
{
Expand Down

0 comments on commit 4722bc8

Please # to comment.