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
|
# 24mar11abu
# (c) Software Lab. Alexander Burger
(de gcc (Nm L . Lst)
(out (tmp Nm ".c") (here "/**/"))
~(case *OS
(("Linux" "FreeBSD")
(quote
(apply call L 'gcc "-o" (tmp Nm)
"-fPIC" "-m64" "-shared" "-export-dynamic"
"-O" "-falign-functions" "-fomit-frame-pointer"
"-W" "-Wimplicit" "-Wreturn-type" "-Wunused" "-Wformat"
"-Wuninitialized" "-Wstrict-prototypes"
"-pipe" "-D_GNU_SOURCE" (tmp Nm ".c") ) ) )
("SunOS"
(quote
(apply call L 'gcc "-o" (tmp Nm)
"-fPIC" "-m64" "-shared"
"-O" "-falign-functions" "-fomit-frame-pointer"
"-W" "-Wimplicit" "-Wreturn-type" "-Wunused" "-Wformat"
"-Wuninitialized" "-Wstrict-prototypes"
"-pipe" "-D_GNU_SOURCE" (tmp Nm ".c") ) ) ) )
(for L Lst
(def (car L)
(list
(cadr L)
(cons 'native (tmp Nm) (name (caddr L)) (cdddr L)) ) )
(when (== '@ (fin (cadr L)))
(push (cdaar L) 'pass) ) ) )
(de unsigned (N)
(& `(dec (** 2 32)) (+ N `(** 2 32))) )
# vi:et:ts=3:sw=3
|