mirror of
https://github.com/justinethier/cyclone.git
synced 2025-07-16 09:17:35 +02:00
Use env functions for gcc calls
This commit is contained in:
parent
a3594999e0
commit
145d055af2
1 changed files with 7 additions and 4 deletions
11
cyclone.scm
11
cyclone.scm
|
@ -8,6 +8,8 @@
|
||||||
;; TODO: will need to read these from env somehow.
|
;; TODO: will need to read these from env somehow.
|
||||||
;; for now they are just hard-coded, but that won't work for an install
|
;; for now they are just hard-coded, but that won't work for an install
|
||||||
(define (cyc:get-lib-dir) "/home/justin/Documents/cyclone/")
|
(define (cyc:get-lib-dir) "/home/justin/Documents/cyclone/")
|
||||||
|
(define (cyc:get-clib-dir) "/home/justin/Documents/cyclone/")
|
||||||
|
(define (cyc:get-include-dir) "/home/justin/Documents/cyclone/")
|
||||||
|
|
||||||
(cond-expand
|
(cond-expand
|
||||||
(chicken
|
(chicken
|
||||||
|
@ -234,14 +236,15 @@
|
||||||
(if cc?
|
(if cc?
|
||||||
(cond
|
(cond
|
||||||
(program?
|
(program?
|
||||||
(write `(DEBUG ,(lib:imports->objs (cdar in-prog) ".")))
|
; TODO: if there is an (import)
|
||||||
|
; (write `(DEBUG ,(lib:imports->objs (cdar in-prog) ".")))
|
||||||
(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: n eed 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" (cyc:get-clib-dir) " -lcyclone -lm -I" (cyc:get-include-dir) " -g -o " exec-file)))
|
||||||
(else
|
(else
|
||||||
(system
|
(system
|
||||||
(string-append "gcc " src-file " -I. -g -c -o " exec-file ".o")))))))
|
(string-append "gcc " src-file " -I" (cyc:get-include-dir) " -g -c -o " exec-file ".o")))))))
|
||||||
|
|
||||||
|
|
||||||
;; Handle command line arguments
|
;; Handle command line arguments
|
||||||
|
|
Loading…
Add table
Reference in a new issue