| From b4ff5886797e72d1c21da43261ca7648412f3186 Mon Sep 17 00:00:00 2001 |
| From: Vyacheslav Yurkov <Vyacheslav.Yurkov@bruker.com> |
| Date: Mon, 23 May 2022 19:53:21 +0200 |
| Subject: [PATCH] makefile: fix linking flags |
| |
| LDLIBS should be placed at the end according to |
| https://www.gnu.org/software/make/manual/html_node/Catalogue-of-Rules.html |
| |
| Signed-off-by: Vyacheslav Yurkov <Vyacheslav.Yurkov@bruker.com> |
| --- |
| makefile | 4 ++-- |
| 1 file changed, 2 insertions(+), 2 deletions(-) |
| |
| diff --git a/makefile b/makefile |
| index fb1bed4..038c7ce 100644 |
| --- a/makefile |
| +++ b/makefile |
| @@ -1,11 +1,11 @@ |
| CFLAGS = -Wall -std=c99 |
| -LFLAGS = -lm |
| +LDLIBS = -lm |
| CC = gcc |
| |
| all: overlay |
| |
| overlay: main.o logic.o sh.o |
| - $(CC) $(LFLAGS) main.o logic.o sh.o -o overlay |
| + $(CC) main.o logic.o sh.o -o overlay $(LDLIBS) |
| |
| main.o: main.c logic.h |
| $(CC) $(CFLAGS) -c main.c |