title: GCC generate assembly language output with make file
body: <p>I am trying to generate, and save to a file, the assembly language for a program that is compiled using a configure file.</p>
  
  <p>I want to generate the same sort out output that -S produces but unfortunately this does not work because no output object is generated. The general compile goes like:</p>
  
  <pre><code>make clean
  make distclean
  CFLAGS="-O1" ./configure --prefix="a/location/"
  CFLAGS="-O1" make
  make install
  </code></pre>
  
  <p>When the CFLAGS also contains "-Wa,-a,-ad,-aln=assembly.lst" it generates this for the output file:</p>
  
  <pre><code>   1                    .file   "conftest.c"
     2                    .text
     3                .globl main
     5                main:
     6                .LFB4:
     7                    .cfi_startproc
     8 0000 B8000000      movl    $0, %eax
     8      00
     9 0005 C3            ret
    10                    .cfi_endproc
    11                .LFE4:
    13                    .comm   x,4,4
    14                    .ident  "GCC: (GNU) 4.4.6"
    15                    .section    .note.GNU-stack,"",@progbits
  DEFINED SYMBOLS
                              *ABS*:0000000000000000 conftest.c
       /tmp/cc8eyzpq.s:5      .text:0000000000000000 main
                              *COM*:0000000000000004 x
  </code></pre>
  
  <p>I would expect a lot more to be generated, or perhaps I am misunderstanding what the flags do. Again my aim is to generate all the optimised code as assembly language similar to the -S option.</p>
  
  <p>Thanks!</p>