File: gcc.l

package info (click to toggle)
picolisp 3.1.0.7-1
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 4,100 kB
  • sloc: ansic: 14,205; lisp: 795; makefile: 290; sh: 13
file content (40 lines) | stat: -rw-r--r-- 1,627 bytes parent folder | download | duplicates (2)
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
# 10oct08abu
# (c) Software Lab. Alexander Burger

(de gcc (S L . @)
   (out (tmp S ".c")
      (chdir '@ (prinl "#include \"" (pwd) "/src/pico.h\""))
      (here "/**/") )
   ~(case *OS
      (("Linux" "FreeBSD")
         (quote
            (apply call L 'gcc "-m32" "-o" (tmp S)
               "-shared" "-export-dynamic"
               "-O" "-falign-functions" "-fomit-frame-pointer"
               "-W" "-Wimplicit" "-Wreturn-type" "-Wunused" "-Wformat"
               "-Wuninitialized" "-Wstrict-prototypes"
               "-pipe" "-D_GNU_SOURCE" "-D_FILE_OFFSET_BITS=64" (tmp S ".c") ) ) )
      ("Darwin"
         (quote
            (apply call L 'gcc "-o" (tmp S)
               "-dynamiclib" "-undefined" "dynamic_lookup"
               "-O" "-falign-functions" "-fomit-frame-pointer"
               "-W" "-Wimplicit" "-Wreturn-type" "-Wunused" "-Wformat"
               "-Wuninitialized" "-Wstrict-prototypes"
               "-pipe" "-D_GNU_SOURCE" "-D_FILE_OFFSET_BITS=64" (tmp S ".c") ) ) )
      ("Cygwin"
         (quote
            (call 'gcc "-c"
               "-Os" "-falign-functions" "-fomit-frame-pointer"
               "-W" "-Wimplicit" "-Wreturn-type" "-Wunused" "-Wformat"
               "-Wuninitialized" "-Wstrict-prototypes"
               "-pipe" "-D_GNU_SOURCE" "-D_FILE_OFFSET_BITS=64"
               (pack "-I" (path "@src") )
               "-o" (tmp S ".o") (tmp S ".c"))
            (apply call L 'gcc "-shared" "-o" (tmp S ".dll")
               (tmp S ".o")
               (path "@bin/picolisp.dll") ) ) ) )
   (while (args)
      (def (next) (def (tmp S ': (arg)))) ) )

# vi:et:ts=3:sw=3