-3

This is my Makefile:

EXEC_NAME = bin/exemple bin/test
OBJ_FILES = bin/main.o bin/Image.o bin/Pixel.o

CC * g++
CFLAGS * -wall -ggdb
INCLUDES *
LIBS *

all: $(EXEC_NAME)
exemple:  mainExemple.o Image.o Pixel.o*

test: mainTest.o Image.o Pixel.o 
    $(CC) bin/main.o bin/Image.o bin/Pixel.o -o bin/test $(LIBS)

mainExemple.o: src/mainTest.cpp src/Image.cpp src/Pixel.cpp
    $(CC) $(CFLAGS) $(INCLUDES) -o bin/mainExemple.o src/mainExemple

mainTest.o: src/mainTest.cpp src/Image/h src/Pixel.h
    $(CC) $(CFLAGS) $(INCLUDES) -o bin/mainTest.o -c src/mainTest.cpp

Image.o: src/Image.cpp src/Image.h src/Pixel.h
    $(CC) $(CFLAGS) $(INCLUDES) -o bin/Image.o -c src/Image.cpp

Pixel.o: src/Pixel.cpp src/Pixel.h
    $(CC) $(CFLAGS) $(INCLUDES) -o bin/Pixel.o -c src/Pixel.cpp

main.o: $(SRC)main.cpp $(SRC)Image.h $(SRC)Pixel.h
    g++ $(FLAGS) -c $(SRC)main.cpp -o $(OBJ)main.o

clear:rm $(OBJ)*.o

and i get : Makefile:4: *** missing seperator. Stop.

Where is my mistake?

Alan Birtles
  • 32,622
  • 4
  • 31
  • 60

1 Answers1

0
  1. Use tabs not spaces
  2. Line 4 to 8 - you can't just have frefloating commands like bash. You need them to be part of something.
artoonie
  • 822
  • 5
  • 14