From: Oliver Schmidt Date: Mon, 29 Apr 2013 14:03:14 +0000 (+0300) Subject: Most hosts require the math library to be linked explicitly. X-Git-Tag: V2.14~48 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=780f38acd5bf35c852d804e39a5dbfca43c6c5c4;p=cc65 Most hosts require the math library to be linked explicitly. --- diff --git a/src/Makefile b/src/Makefile index b97291f3b..ead1387e8 100644 --- a/src/Makefile +++ b/src/Makefile @@ -20,6 +20,8 @@ CFLAGS += -MMD -MP -O -std=c89 -I common \ -DCA65_INC=$(CA65_INC) -DCC65_INC=$(CC65_INC) \ -DLD65_LIB=$(LD65_LIB) -DLD65_OBJ=$(LD65_OBJ) -DLD65_CFG=$(LD65_CFG) +LDLIBS += -lm + all: $(PROGS) mostlyclean: @@ -74,7 +76,7 @@ define PROG_template $$(eval $$(call OBJS_template,$(1))) ../bin/$(1): $$($(1)_OBJS) ../wrk/common/common.a | ../bin - $$(CC) $$(LDFLAGS) -o $$@ $$^ + $$(CC) $$(LDFLAGS) $$(LDLIBS) -o $$@ $$^ $(1): ../bin/$(1)