mirror of
https://github.com/justinethier/cyclone.git
synced 2025-07-07 13:16:34 +02:00
WIP
This commit is contained in:
parent
c9af448be2
commit
d10a45e62d
2 changed files with 15 additions and 2 deletions
|
@ -231,7 +231,7 @@
|
||||||
(if program?
|
(if program?
|
||||||
(system
|
(system
|
||||||
;; -I is a hack, real answer is to use 'make install' to place .h file
|
;; -I is a hack, real answer is to use 'make install' to place .h file
|
||||||
TODO: need to link to object files from lib:import->obj-file
|
;TODO: need to link to object files from lib:import->obj-file
|
||||||
(string-append "gcc " src-file " -L. -lcyclone -lm -I. -g -o " exec-file))
|
(string-append "gcc " src-file " -L. -lcyclone -lm -I. -g -o " exec-file))
|
||||||
(system
|
(system
|
||||||
(string-append "gcc " src-file " -I. -g -c -o " exec-file ".o"))))))
|
(string-append "gcc " src-file " -I. -g -c -o " exec-file ".o"))))))
|
||||||
|
|
15
trans.scm
15
trans.scm
|
@ -1802,8 +1802,21 @@
|
||||||
import))
|
import))
|
||||||
".sld"))
|
".sld"))
|
||||||
;; Resolve, EG: (libs lib2) ==> lib2.o
|
;; Resolve, EG: (libs lib2) ==> lib2.o
|
||||||
|
;; Thing is though, what if a library includes another library? now the
|
||||||
|
;; program needs to link to both .o files
|
||||||
(define (lib:import->obj-file import)
|
(define (lib:import->obj-file import)
|
||||||
'TODO)
|
(string-append (symbol->string (car (reverse import))) ".o"))
|
||||||
|
|
||||||
|
;; TODO: for a program import set, resolve each to their .o files, then
|
||||||
|
;; process each import recursively to get the .o files that each one of those
|
||||||
|
;; libs requires. will probably need to prune duplicates from completed list.
|
||||||
|
;; longer-term, do we want to look at file timestamps to see if files need to
|
||||||
|
;; be recompiled?
|
||||||
|
(define (lib:imports->objs imports)
|
||||||
|
(for-each
|
||||||
|
(lambda (i)
|
||||||
|
TODO)
|
||||||
|
imports)
|
||||||
;; Read export list for a given import
|
;; Read export list for a given import
|
||||||
(define (lib:import->export-list import basedir)
|
(define (lib:import->export-list import basedir)
|
||||||
(let* ((dir (string-append basedir (lib:import->filename import)))
|
(let* ((dir (string-append basedir (lib:import->filename import)))
|
||||||
|
|
Loading…
Add table
Reference in a new issue