Andrew Geissler | 78b7279 | 2022-06-14 06:47:25 -0500 | [diff] [blame] | 1 | From b4ff5886797e72d1c21da43261ca7648412f3186 Mon Sep 17 00:00:00 2001 |
| 2 | From: Vyacheslav Yurkov <Vyacheslav.Yurkov@bruker.com> |
| 3 | Date: Mon, 23 May 2022 19:53:21 +0200 |
| 4 | Subject: [PATCH] makefile: fix linking flags |
| 5 | |
| 6 | LDLIBS should be placed at the end according to |
| 7 | https://www.gnu.org/software/make/manual/html_node/Catalogue-of-Rules.html |
| 8 | |
| 9 | Signed-off-by: Vyacheslav Yurkov <Vyacheslav.Yurkov@bruker.com> |
| 10 | --- |
Patrick Williams | 520786c | 2023-06-25 16:20:36 -0500 | [diff] [blame] | 11 | Upstream-Status: Pending |
| 12 | |
Andrew Geissler | 78b7279 | 2022-06-14 06:47:25 -0500 | [diff] [blame] | 13 | makefile | 4 ++-- |
| 14 | 1 file changed, 2 insertions(+), 2 deletions(-) |
| 15 | |
| 16 | diff --git a/makefile b/makefile |
| 17 | index fb1bed4..038c7ce 100644 |
| 18 | --- a/makefile |
| 19 | +++ b/makefile |
| 20 | @@ -1,11 +1,11 @@ |
| 21 | CFLAGS = -Wall -std=c99 |
| 22 | -LFLAGS = -lm |
| 23 | +LDLIBS = -lm |
| 24 | CC = gcc |
| 25 | |
| 26 | all: overlay |
| 27 | |
| 28 | overlay: main.o logic.o sh.o |
| 29 | - $(CC) $(LFLAGS) main.o logic.o sh.o -o overlay |
| 30 | + $(CC) main.o logic.o sh.o -o overlay $(LDLIBS) |
| 31 | |
| 32 | main.o: main.c logic.h |
| 33 | $(CC) $(CFLAGS) -c main.c |