Can't link with ld

Hi!

I’m having problems linking a C++ application I’m building with SDL (which by the way rox!). ld gives me the following error:

kennel ~/engine> make
g++ -Os -Wall sdl-config --cflags -c engine.cpp
g++ -Os -Wall sdl-config --cflags -c image.cpp
g++ -Os -Wall sdl-config --cflags -c font.cpp
nasm -f elf memfill.s
ld -s -Ur sdl-config --libs engine.o image.o font.o global.o memfill.o -o engine
ld: unrecognized option '-Wl,-rpath,/usr/lib’
ld: use the --help option for usage information
make: *** [engine] Error 1

I don’t get it. Does anyone have any idea what might be wrong?

I’ve included my Makefile.

Regards
Rickard Andersson
arpenNOSPAM at NOSPAMhome.se

########## MAKEFILE ############

PROG = engine
CFLAGS = -Os -Wall sdl-config --cflags
CC = g++
LFLAGS = -s -Ur
LD = ld
AFLAGS = -f elf
AS = nasm
STRIP = strip
RM = rm -f
LIBS = sdl-config --libs
OBJS = engine.o image.o font.o global.o memfill.o

$(PROG): $(OBJS)
$(LD) $(LFLAGS) $(LIBS) $(OBJS) -o $(PROG)

%.o: %.cpp
$(CC) $(CFLAGS) -c $<

%.o: %.s
$(AS) $(AFLAGS) $<

engine.o: engine.cpp
image.o: image.cpp image.h
font.o: font.cpp font.h
global.o: global.h
memfill.o: memfill.s memfill.h

clean:
$(RM) $(PROG) $(OBJS)