title: GCC makefile doesn't accept -std=c99 -lm
body: <p>I am having problem with my makefile with gcc compiler. If I use gcc directly as:</p>
  
  <pre><code>gcc -std=c99 -lm tm.c tm_coins.c tm_options.c tm_stock.c tm_utility.c -o tm -Wall -pedantic
  </code></pre>
  
  <p>Everything works fine. I need -std-c99 and -lm.</p>
  
  <p>However, I have been told to use makefile. Here is my make file:</p>
  
  <pre><code>CFLAGS=-ansi -Wall -pedantic
  LFLAGS=-std=c99 -lm 
  CC=gcc
  all:tm
  tm:tm.o tm_coins.o tm_options.o tm_stock.o tm_utility.o
      $(CC) $(LFLAGS) tm.o tm_coins.o tm_options.o tm_stock.o tm_utility.o -o tm $(CFLAGS)
  
  tm.o: tm.h tm.c
      $(CC) $(LFLAGS) $(CFLAGS) -c tm.c
  
  tm_coins.o:tm_coins.h tm_coins.c
      $(CC) $(LFLAGS) $(CFLAGS) -c tm_coins.c
  
  tm_options:tm_options.h tm_options.c
      $(CC) $(LFLAGS) $(CFLAGS) -c tm_options.c
  
  tm_stock:tm_stock.h tm_stock.c
      $(CC) $(LFLAGS) $(CFLAGS) -c tm_stock.c
  
  tm_utility:tm_utility.h tm_utility.c
      $(CC) $(LFLAGS) $(CFLAGS) -c tm_utility.c
  </code></pre>
  
  <p>With above makefile I get below errors. My understanding is that -std=c99 and -lm doesn't work. (look at the first line below. -std=c99 and -lm are not there)</p>
  
  <pre><code>gcc -ansi -Wall -pedantic   -c -o tm_options.o tm_options.c
  tm_options.c: In function ‘purchase_ticket’:
  tm_options.c:37: error: expected expression before ‘/’ token
  tm_options.c:52: error: expected expression before ‘/’ token
  tm_options.c:102: warning: ISO C90 forbids mixed declarations and code
  tm_options.c: In function ‘display_tickets’:
  tm_options.c:239: error: expected expression before ‘/’ token
  tm_options.c: In function ‘add_ticket’:
  tm_options.c:285: error: expected expression before ‘/’ token
  tm_options.c:303: error: expected expression before ‘/’ token
  tm_options.c:314: warning: ISO C90 forbids mixed declarations and code
  tm_options.c: In function ‘delete_ticket’:
  tm_options.c:387: error: expected expression before ‘/’ token
  tm_options.c:405: error: expected expression before ‘/’ token
  tm_options.c: In function ‘display_coins’:
  tm_options.c:461: error: expected expression before ‘/’ token
  tm_options.c: In function ‘restock_tickets’:
  tm_options.c:501: error: expected expression before ‘/’ token
  tm_options.c: In function ‘restock_coins’:
  tm_options.c:526: error: expected expression before ‘/’ token
  tm_options.c: In function ‘save_data’:
  tm_options.c:555: warning: ISO C90 forbids mixed declarations and code
  </code></pre>
  
  <p>Where would be the error? Thanks in advance.</p>