I have written the following Makefile:
CC='/buildtools/toolchain/wr-x86/3.0FCScg/bin/i586-wrs-linux-gnu-gcc --sysroot=/buildtools/toolchain/wr-x86/3.0FCScg/sysroot'
IDIR =../../../include
CFLAGS=-I$(IDIR)
LDIR =../../../../../../../../.debug/lib.out/public/
LIBS= -lmylib1 -lmylib2 -lmylib3
myexec: my_code.c
$(CC) $(CFLAGS) -o myexec my_code.c
It throws error:
Makefile:9: *** missing separator. Stop
I looked at a related question here. It says there can a problem with a tab. I double checked the code. I am using a tab and not spaces. However when I run
cat -e -t -v Makefile
I get the following, that implies there is no tab before $CC
.
CC='/buildtools/toolchain/wr-x86/3.0FCScg/bin/i586-wrs-linux-gnu-gcc --sysroot=/buildtools/toolchain/wr-x86/3.0FCScg/sysroot'$
IDIR =../../../include$
CFLAGS=-I$(IDIR)$
$
LDIR =../../../../../../../../.debug/lib.out/public/$
LIBS= -lmylib1 -lmylib2 -lmylib3$
$
myexec: my_code.c$
$(CC) $(CFLAGS) -o myexec my_code.c$
I also checked my .vimrc file. I have set tabstop=4
. I tried removing this, but it rather made the situation worse. It started giving me error: Makefile:9: *** missing separator (did you mean TAB instead of 8 spaces?). Stop.
This is how it looks:
syntax on
colorscheme desert
set nocompatible
set number
set backspace=indent,eol,start
set autoindent
set ruler
set spell
set title
set et
set mouse=v
set history=100
set tabstop=4