This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

make errors


I was writing a make file

CC=gcc
CFLAGS=-Wall -I/usr/include
HEADERS=defines.h
SOURCES=main.c hello.c math.c
#OBJECTS=main.o hello.o math.o
OBJECTS=$(SOURCES:.c=.o)
#Object files have the same name as the .c files but extension .o
PROGRAM=hello
$(PROGRAM): $(OBJECTS)
        $(CC) $(OBJECTS) -o $(PROGRAM)

main.o: hello.c math.c defines.h
hello.o: defines.h math.c
math.o: defines.h hello.c
clean:
rm -rf *.o $(PROGRAM)

when I ran it it gave


Makefile:16: *** missing separator.  Stop



WHAT TO DO. HOW THIS ERROR WILL BE SOLVED?
HOW WILL I BE ABLE TO RUN MY MAKE FILE
THANKS






Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]