heya,
i have a makefile which is pasted below. on execution i get the following:
-bash-2.05b$ makefile
./makefile: line 1: CC: command not found
./makefile: line 2: CFLAGS: command not found
./makefile: line 3: LDFLAGS: command not found
./makefile: line 4: SOURCE: command not found
./makefile: line 5: OBJECTS: command not found
./makefile: line 6: PROGRAM: command not found
./makefile: line 1: PROGRAM: command not found
./makefile: line 8: all:: command not found
./makefile: line 1: PROGRAM: command not found
./makefile: line 1: OBJECTS: command not found
./makefile: line 1: CC: command not found
./makefile: line 1: OBJECTS: command not found
./makefile: line 1: CFLAGS: command not found
./makefile: line 1: LDFLAGS: command not found
./makefile: line 1: PROGRAM: command not found
./makefile: line 11: -o: command not found
./makefile: line 13: fg: no job control
./makefile: line 14: syntax error near unexpected token `newline'
./makefile: line 14: ` $(CC) $(CFLAGS) -c $
anyone got any ideas what may be causing this?
im trying to run the makefile on both unix and linux.
thanks in adv.
-twan
Code:
CC = g++
CFLAGS = -ansi -g -pedantic -Wall -Wno-missing-braces
LDFLAGS = -lsocket -lnsl -lm
SOURCE = .cc .h
OBJECTS = display.o filereader.o program.o
PROGRAM = pguide
all: $(PROGRAM)
$(PROGRAM): $(OBJECTS)
$(CC) $(OBJECTS) $(CFLAGS) $(LDFLAGS) -o $(PROGRAM)
%.o: %.cc %.h
$(CC) $(CFLAGS) -c $<
clean:
rm -f $(PROGRAM) *.o
tarfile:
rm -f $(TARFILE)
tar cf $(TARFILE) $(SOURCE) Makefile