2

I keep getting this error while I try to run the code on my raspberry pi, I dont know what has caused this:

CC = gcc
CFLAGS = -Wall -O0 -std=gnu99 -I/usr/local/include -g
LDFLAGS = -L/usr/local/lib -pthread -lm -lwiringPi
FUSEFLAGS = `pkg-config fuse --cflags --libs`

SOURCES = $(wildcard *.c)
PROGS = $(patsubst %.c,%,$(SOURCES))
BINS = $(SOURCES:.c=)

all: $(PROGS)

%: %.c
        $(CC) $<  $(CFLAGS) $(LDFLAGS) -o $@ $(FUSEFLAGS)

clean:
        $(RM) *.o *.a $(BINS)

this gives the following error:

Makefile:14: *** missing separator.  Stop.

when I use make to run my code. my make was working before I am not sure what has caused this happend all the sudden!

S. N
  • 3,456
  • 12
  • 42
  • 65

1 Answers1

3
CC = gcc
CFLAGS = -Wall -O0 -std=gnu99 -I/usr/local/include -g
LDFLAGS = -L/usr/local/lib -pthread -lm -lwiringPi
FUSEFLAGS = `pkg-config fuse --cflags --libs`

SOURCES = $(wildcard *.c)
PROGS = $(patsubst %.c,%,$(SOURCES))
BINS = $(SOURCES:.c=)

all: $(PROGS)

%: %.c
<___T___A___B___>$(CC) $<  $(CFLAGS) $(LDFLAGS) -o $@ $(FUSEFLAGS)

clean:
<___T___A___B___>$(RM) *.o *.a $(BINS)

Where I have written <___T___A___B___>, there should be 1 tab and not spaces !

Duck Dodgers
  • 3,409
  • 8
  • 29
  • 43
  • i am not sure why it happened, because it was working and then i got this error! thanks – S. N Apr 12 '19 at 14:11
  • Some editors (and maybe version control software) could be configured to replace tabs with spaces (since tabs do not always appear the same across different editors/(editor-settings). – Duck Dodgers Apr 12 '19 at 15:12