Check-in [07d1d92554]
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:07d1d925546fc29f9f2e252ab1fa68463eb1cbdd
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
..
61
62
63
64
65
66
67


















68
69
70
71
72
73
74
...
165
166
167
168
169
170
171












172
173
174
175
176
177
178
			if {$pkgName == ""} {
				set type "exe"
			} else {
				set type "package"
			}
		}

		array set $handle [list tcc $tcc_handle code "" type $type filename $output package $pkgName]

		proc $handle {cmd args} [string map [list @@HANDLE@@ $handle] {
			set handle {@@HANDLE@@}

			if {$cmd == "go"} {
				set args [list 0 {*}$args]
			}
................................................................................
	}

	proc _linktclcommand {cSymbol tclCommand} {
		upvar #0 $handle state

		lappend state(procs) $cSymbol $tclCommand
	}



















	proc _cproc {handle name adefs rtype {body "#"}} {
		upvar #0 $handle state

		set wrap [::tcc4tcl::wrap $name $adefs $rtype $body]

		set wrapped [lindex $wrap 0]
................................................................................
			}
			default {
				set tcc_type $state(type)
			}
		}

		tcc4tcl $dir $tcc_type tcc













		switch -- $state(type) {
			"memory" {
				tcc compile $code

				if {[info exists state(procs)] && [llength $state(procs)] > 0} {
					foreach {procname cname} $state(procs) {







|







 







>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>







 







>
>
>
>
>
>
>
>
>
>
>
>







30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
..
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
...
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
			if {$pkgName == ""} {
				set type "exe"
			} else {
				set type "package"
			}
		}

		array set $handle [list tcc $tcc_handle code "" type $type filename $output package $pkgName add_inc_path "" add_lib_path "" add_lib ""]

		proc $handle {cmd args} [string map [list @@HANDLE@@ $handle] {
			set handle {@@HANDLE@@}

			if {$cmd == "go"} {
				set args [list 0 {*}$args]
			}
................................................................................
	}

	proc _linktclcommand {cSymbol tclCommand} {
		upvar #0 $handle state

		lappend state(procs) $cSymbol $tclCommand
	}

	proc _add_include_path {args} {
		upvar #0 $handle state

		lappend state(add_inc_path) {*}$args
	}

	proc _add_library_path {args} {
		upvar #0 $handle state

		lappend state(add_lib_path) {*}$args
	}

	proc _add_library {args} {
		upvar #0 $handle state

		lappend state(add_lib) {*}$args
	}

	proc _cproc {handle name adefs rtype {body "#"}} {
		upvar #0 $handle state

		set wrap [::tcc4tcl::wrap $name $adefs $rtype $body]

		set wrapped [lindex $wrap 0]
................................................................................
			}
			default {
				set tcc_type $state(type)
			}
		}

		tcc4tcl $dir $tcc_type tcc

		foreach dir $state(add_inc_path) {
			tcc add_include_path $dir
		}

		foreach dir $state(add_lib_path) {
			tcc add_library_path $dir
		}

		foreach lib $state(add_lib) {
			tcc add_library $lib
		}

		switch -- $state(type) {
			"memory" {
				tcc compile $code

				if {[info exists state(procs)] && [llength $state(procs)] > 0} {
					foreach {procname cname} $state(procs) {