Skip to content

Commit

Permalink
attempt at i386-macosx --- not yet tested
Browse files Browse the repository at this point in the history
  • Loading branch information
LiberalArtist committed Apr 12, 2020
1 parent 6fb2e11 commit 5c411b8
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 26 deletions.
36 changes: 28 additions & 8 deletions portaudio/lib/cc.rkt
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,37 @@
(define-runtime-path callbacks.c
"callbacks.c")

(define so-path
(let-values ([{base _name _dir} (split-path callbacks.c)])
(build-path base
(system-library-subpath #f)
(append-extension-suffix "callbacks"))))
(define lib/
(path-only callbacks.c))

(define (cc)
(parameterize ([current-use-mzdyn #f])
(when (file-exists? so-path)
(define so-path-elem
(append-extension-suffix "callbacks"))

(define (cc [so-path (build-path lib/
(system-library-subpath #f)
so-path-elem)]
#:overwrite? [overwrite? #t])
(parameterize ([current-use-mzdyn #f]
[current-extension-linker-flags
(if (eq? 'macosx (system-type 'os))
(list* "-mmacosx-version-min=10.5"
(current-extension-linker-flags))
(current-extension-linker-flags))])
(when (and overwrite? (file-exists? so-path))
(delete-file so-path))
(make-parent-directory* so-path)
(link-extension #f ;; not quiet
(list callbacks.c)
so-path)))

(define (cc/i386-macosx)
(unless (eq? 'macosx (system-type 'os))
(raise-arguments-error 'cc/i386-macosx
"unsupported system type"
"expected" 'macosx
"given" (system-type 'os)))
(parameterize ([current-extension-linker-flags
(list* "-arch"
"i386"
(current-extension-linker-flags))])
(cc (build-path lib/ "i386-macosx" so-path-elem))))
Binary file modified portaudio/lib/i386-macosx/callbacks.dylib
Binary file not shown.
18 changes: 0 additions & 18 deletions portaudio/lib/makefile-mac

This file was deleted.

Binary file modified portaudio/lib/x86_64-macosx/callbacks.dylib
Binary file not shown.

0 comments on commit 5c411b8

Please sign in to comment.