picolisp

Unnamed repository; edit this file to name it for gitweb.
git clone https://logand.com/git/picolisp.git/
Log | Files | Refs | README | LICENSE

gcc.l (1627B)


      1 # 10oct08abu
      2 # (c) Software Lab. Alexander Burger
      3 
      4 (de gcc (S L . @)
      5    (out (tmp S ".c")
      6       (chdir '@ (prinl "#include \"" (pwd) "/src/pico.h\""))
      7       (here "/**/") )
      8    ~(case *OS
      9       (("Linux" "FreeBSD")
     10          (quote
     11             (apply call L 'gcc "-m32" "-o" (tmp S)
     12                "-shared" "-export-dynamic"
     13                "-O" "-falign-functions" "-fomit-frame-pointer"
     14                "-W" "-Wimplicit" "-Wreturn-type" "-Wunused" "-Wformat"
     15                "-Wuninitialized" "-Wstrict-prototypes"
     16                "-pipe" "-D_GNU_SOURCE" "-D_FILE_OFFSET_BITS=64" (tmp S ".c") ) ) )
     17       ("Darwin"
     18          (quote
     19             (apply call L 'gcc "-o" (tmp S)
     20                "-dynamiclib" "-undefined" "dynamic_lookup"
     21                "-O" "-falign-functions" "-fomit-frame-pointer"
     22                "-W" "-Wimplicit" "-Wreturn-type" "-Wunused" "-Wformat"
     23                "-Wuninitialized" "-Wstrict-prototypes"
     24                "-pipe" "-D_GNU_SOURCE" "-D_FILE_OFFSET_BITS=64" (tmp S ".c") ) ) )
     25       ("Cygwin"
     26          (quote
     27             (call 'gcc "-c"
     28                "-Os" "-falign-functions" "-fomit-frame-pointer"
     29                "-W" "-Wimplicit" "-Wreturn-type" "-Wunused" "-Wformat"
     30                "-Wuninitialized" "-Wstrict-prototypes"
     31                "-pipe" "-D_GNU_SOURCE" "-D_FILE_OFFSET_BITS=64"
     32                (pack "-I" (path "@src") )
     33                "-o" (tmp S ".o") (tmp S ".c"))
     34             (apply call L 'gcc "-shared" "-o" (tmp S ".dll")
     35                (tmp S ".o")
     36                (path "@bin/picolisp.dll") ) ) ) )
     37    (while (args)
     38       (def (next) (def (tmp S ': (arg)))) ) )
     39 
     40 # vi:et:ts=3:sw=3