On Wed, Dec 24, 2008 at 7:39 PM, Tyler Littlefield <ty...@tysdomain.com> wrote:

> I think my client garbled it.
> I sorta got the gist of how to do the makefiles from a tutorial on google, 
> but didn't pick up the indent with my reader. is s everything after : 
> supposed to be indented until the next :-ending line?

Yes, any actions that follow a dependency rule must be indented by a
tab (an action being a compile statement or shell command or similar

The basic syntax is

target: dependency
[tab]action

>  ----- Original Message -----
>  From: Brett McCoy
>  To: c-prog@yahoogroups.com
>  Sent: Wednesday, December 24, 2008 3:32 PM
>  Subject: Re: [c-prog] help with makefile
>
>
>  On Wed, Dec 24, 2008 at 7:23 PM, Tyler Littlefield <ty...@tysdomain.com> 
> wrote:
>
>  > Hello list,
>  > I've got the following makefile:
>  > #TDUtil Makefile
>  > CC = g++
>  > C_FLAGS = -Wall -O3
>  > L_FLAGS = -lm
>  > OUTPUT=rstring
>  > O_FILES = pwd.o
>  > all: $(O_FILES)
>  > rm -f $(OUTPUT)
>  > $(CC) -o $(OUTPUT) $(O_FILES) $(L_FLAGS)
>  > $(O_FILES): %.o: %.cpp
>  > $(CC) -c $(C_FLAGS) $<
>  > clean:
>  > rm -f $(O_FILES)
>  > rm -f $(OUTPUT)
>  >
>  > When I use make, it says that it's missing seperator on line 8--any ideas?
>
>  Assuming your Makefile is pasted verbatim, you are missing indents:
>
>  CC = g++
>  C_FLAGS = -Wall -O3
>  L_FLAGS = -lm
>  OUTPUT=rstring
>  O_FILES = pwd.o
>  all: $(O_FILES)
>  rm -f $(OUTPUT)
>  $(CC) -o $(OUTPUT) $(O_FILES) $(L_FLAGS)
>  $(O_FILES): %.o: %.cpp
>  $(CC) -c $(C_FLAGS) $<
>  clean:
>  rm -f $(O_FILES)
>  rm -f $(OUTPUT)
>
>  -- Brett
>  ----------------------------------------------------------
>  "In the rhythm of music a secret is hidden;
>  If I were to divulge it, it would overturn the world."
>  -- Jelaleddin Rumi
>
>
>
>
> [Non-text portions of this message have been removed]
>
>
> ------------------------------------
>
> To unsubscribe, send a blank message to 
> <mailto:c-prog-unsubscr...@yahoogroups.com>.Yahoo! Groups Links
>
>
>
>



-- 
------------------------------------------------------------
"In the rhythm of music a secret is hidden;
    If I were to divulge it, it would overturn the world."
               -- Jelaleddin Rumi

Reply via email to