Overview
Comment: | Added the ability to search other paths for libraries and headers |
---|---|
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA1: |
07d1d925546fc29f9f2e252ab1fa6846 |
User & Date: | rkeene on 2014-06-22 22:55:23 |
Other Links: | manifest | tags |
Context
2014-06-22
| ||
23:23 | Fixed issues with several subcommands check-in: 05cac27666 user: rkeene tags: trunk | |
22:55 | Added the ability to search other paths for libraries and headers check-in: 07d1d92554 user: rkeene tags: trunk | |
18:05 | Updated to process string through expr(wide()) to format them correctly check-in: fc293f04c4 user: rkeene tags: trunk | |
Changes
Modified tcc4tcl.tcl from [f7535f5aaf] to [33bc62956b].
30 30 if {$pkgName == ""} { 31 31 set type "exe" 32 32 } else { 33 33 set type "package" 34 34 } 35 35 } 36 36 37 - array set $handle [list tcc $tcc_handle code "" type $type filename $output package $pkgName] 37 + array set $handle [list tcc $tcc_handle code "" type $type filename $output package $pkgName add_inc_path "" add_lib_path "" add_lib ""] 38 38 39 39 proc $handle {cmd args} [string map [list @@HANDLE@@ $handle] { 40 40 set handle {@@HANDLE@@} 41 41 42 42 if {$cmd == "go"} { 43 43 set args [list 0 {*}$args] 44 44 } ................................................................................ 61 61 } 62 62 63 63 proc _linktclcommand {cSymbol tclCommand} { 64 64 upvar #0 $handle state 65 65 66 66 lappend state(procs) $cSymbol $tclCommand 67 67 } 68 + 69 + proc _add_include_path {args} { 70 + upvar #0 $handle state 71 + 72 + lappend state(add_inc_path) {*}$args 73 + } 74 + 75 + proc _add_library_path {args} { 76 + upvar #0 $handle state 77 + 78 + lappend state(add_lib_path) {*}$args 79 + } 80 + 81 + proc _add_library {args} { 82 + upvar #0 $handle state 83 + 84 + lappend state(add_lib) {*}$args 85 + } 68 86 69 87 proc _cproc {handle name adefs rtype {body "#"}} { 70 88 upvar #0 $handle state 71 89 72 90 set wrap [::tcc4tcl::wrap $name $adefs $rtype $body] 73 91 74 92 set wrapped [lindex $wrap 0] ................................................................................ 165 183 } 166 184 default { 167 185 set tcc_type $state(type) 168 186 } 169 187 } 170 188 171 189 tcc4tcl $dir $tcc_type tcc 190 + 191 + foreach dir $state(add_inc_path) { 192 + tcc add_include_path $dir 193 + } 194 + 195 + foreach dir $state(add_lib_path) { 196 + tcc add_library_path $dir 197 + } 198 + 199 + foreach lib $state(add_lib) { 200 + tcc add_library $lib 201 + } 172 202 173 203 switch -- $state(type) { 174 204 "memory" { 175 205 tcc compile $code 176 206 177 207 if {[info exists state(procs)] && [llength $state(procs)] > 0} { 178 208 foreach {procname cname} $state(procs) {