-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathobjc.setup
45 lines (38 loc) · 1.37 KB
/
objc.setup
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
(use make utils posix)
(define cflags
(cond-expand
(macosx "-I.")
(else
;;(with-input-from-pipe "gnustep-config --objc-flags" read-all)
;; We use these instead - those GNUstep wizards added optimization- and warning flags to the output
;; of "gnustep-config" ...
(string-append
" -fexceptions -fobjc-exceptions"
" -D_NATIVE_OBJC_EXCEPTIONS -Wno-import --param=ssp-buffer-size=4"
" -Wno-unused-variable -Wno-unused-but-set-variable -Wno-unused-function"
" -fgnu-runtime"))))
(define libs
(cond-expand
(macosx "-L. -ldyncall_s -L -lobjc -framework Cocoa")
(else "-L. -ldyncall_s -L -lobjc")))
(make (("objc-compile-time.so" ("objc-compile-time.scm" "foreign-types.scm")
(compile -sJ -O3 -d0 objc-compile-time.scm)
(compile -s -d0 objc-compile-time.import.scm))
("objc.so" ("objc-module.scm" "objc.scm" "objc-syntax.scm" "objc-compile-time.so")
(compile -sJ objc-module.scm -C ,(qs cflags)
-O0 -C -g -v -k
;-O3 -d1
-objc ,libs -o objc.so)
(compile -s -d0 objc.import.scm))
("objc-read-syntax.so" ("objc-read-syntax.scm" "objc-compile-time.so")
(compile -s -O3 -d0 objc-read-syntax.scm)))
'("objc-compile-time.so"
"objc.so"
"objc-read-syntax.so"))
(install-extension
'objc
'("objc-compile-time.so"
"objc-read-syntax.so"
"objc.import.so"
"objc-compile-time.import.so"
"objc.so"))