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

Reply via email to