From 780f38acd5bf35c852d804e39a5dbfca43c6c5c4 Mon Sep 17 00:00:00 2001
From: Oliver Schmidt
Date: Mon, 29 Apr 2013 17:03:14 +0300
Subject: [PATCH] Most hosts require the math library to be linked explicitly.
---
src/Makefile | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
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)
--
2.39.5