summaryrefslogtreecommitdiffstats
path: root/meta-openembedded/meta-oe/recipes-devtools/serialcheck/serialcheck/0001-Makefile-Change-order-of-link-flags.patch
blob: 2ab48345dc1c88692b90a8c24961bf4fdae4d2dd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
From efc8a4e717ba919c869c2da1c7de2d08bc976926 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Wed, 24 Feb 2016 18:48:07 +0000
Subject: [PATCH] Makefile: Change order of link flags

This helps in injectcting LDFLAGS from env to take effect
as it appears last on cmdline now

Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
Upstream-Status: Pending

 Makefile | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/Makefile b/Makefile
index ba2bfbb..6d13e68 100644
--- a/Makefile
+++ b/Makefile
@@ -1,3 +1,9 @@
-CFLAGS=-O2 -Wall -Wextra -g -Wno-sign-compare -Wno-pointer-sign
-CC=gcc
+CFLAGS?=-O2 -Wall -Wextra -g -Wno-sign-compare -Wno-pointer-sign
+CC?=gcc
 all: serialcheck
+serialcheck : serialcheck.o
+	$(CC) -o serialcheck serialcheck.o $(CFLAGS) $(LDFLAGS)
+
+%.o : %.c
+	$(CC) -c $(CFLAGS) $(CPPFLAGS) $< -o $@
+
-- 
1.9.1

OpenPOWER on IntegriCloud