I'm trying to write a simple makefile, am getting missing separator:
CC = g++
CFLAGS = -Wall -g
all: compile
compile: array.cpp
$(CC) $(CFLAGS) array.cpp
run: ./result.out
I'm trying to write a simple makefile, am getting missing separator:
CC = g++
CFLAGS = -Wall -g
all: compile
compile: array.cpp
$(CC) $(CFLAGS) array.cpp
run: ./result.out
Try
CC = g++
CFLAGS = -Wall -g
all: compile
compile: array.cpp
$(CC) $(CFLAGS) array.cpp
run:
./result.out
And make sure you use tabs for indentation, not spaces.