This is my Makefile, I get an error "***missing seperator. stop" I am trying to compile a library but for some reason I get this error message. Other SO questions that are similar suggest that it is a tabbing issue, but i could not solve it.
CC=g++
RANLIB=ranlib
LIBSRC=osm.c
LIBOBJ=$(LIBSRC:.c=.o)
INCS=-I.
CFLAGS = -Wall -g $(INCS)
LOADLIBES = -L./
OSMLIB = libosm.a
TARGETS = $(OSMLIB)
TAR=tar
TARFLAGS=-cvf
TARNAME=ex1.tar
TARSRCS=$(LIBSRC) Makefile README
all: $(TARGETS)
$(TARGETS): $(LIBOBJ)
$(AR) $(ARFLAGS) $@ $^ //this line fails with the warning
$(RANLIB) $@
clean:
$(RM) $(TARGETS) $(OSMLIB) $(OBJ) $(LIBOBJ) *~ *core
depend:
makedepend -- $(CFLAGS) -- $(SRC) $(LIBSRC)
tar:
$(TAR) $(TARFLAGS) $(TARNAME) $(TARSRCS)