--- Makefile.old 2010-09-09 11:30:26.000000000 +0200 +++ Makefile 2010-09-09 11:33:41.000000000 +0200 @@ -253,7 +253,7 @@ SHLIBLDFLAGS=-shared $(LDFLAGS) THREAD_LDFLAGS=-lpthread - LDFLAGS=-ldl -lm + LDLIBS=-ldl -lm ifeq ($(USE_SDL),1) CLIENT_LDFLAGS=$(shell sdl-config --libs) @@ -1074,8 +1074,8 @@ $(B)/tremulous-smp.$(ARCH)$(BINEXT): $(Q3OBJ) $(Q3POBJ_SMP) $(LIBSDLMAIN) @echo "LD $@" - @$(CC) -o $@ $(Q3OBJ) $(Q3POBJ_SMP) $(CLIENT_LDFLAGS) \ - $(THREAD_LDFLAGS) $(LDFLAGS) $(LIBSDLMAIN) + @$(CC) -o $@ ${LDFLAGS} $(Q3OBJ) $(Q3POBJ_SMP) $(CLIENT_LDFLAGS) \ + $(THREAD_LDFLAGS) $(LDLIBS) $(LIBSDLMAIN) ifneq ($(strip $(LIBSDLMAIN)),) ifneq ($(strip $(LIBSDLMAINSRC)),) @@ -1153,7 +1153,7 @@ $(B)/tremded.$(ARCH)$(BINEXT): $(Q3DOBJ) @echo "LD $@" - @$(CC) -o $@ $(Q3DOBJ) $(LDFLAGS) + @$(CC) -o $@ $(LDFLAGS) $(Q3DOBJ) $(LDLIBS)