| From c8e9d2b885deca065bd7955019a6aa071974042d Mon Sep 17 00:00:00 2001 |
| From: Thomas Petazzoni <thomas.petazzoni@bootlin.com> |
| Date: Mon, 5 Aug 2024 23:38:08 +0200 |
| Subject: [PATCH] Makefile: allow the user to pass additional CFLAGS and |
| LDFLAGS |
| |
| This is needed for some build systems. For example, Buildroot needs to |
| disable optimizations on some CPU architectures. |
| |
| Upstream: https://github.com/Atoptool/atop/pull/314 |
| [Waldemar: rebase on top of 2.11.0] |
| Signed-off-by: Waldemar Brodkorb <wbx@openadk.org> |
| Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com> |
| --- |
| Makefile | 4 ++-- |
| 1 file changed, 2 insertions(+), 2 deletions(-) |
| |
| diff --git a/Makefile b/Makefile |
| index 3a63f69..ab44eaa 100644 |
| --- a/Makefile |
| +++ b/Makefile |
| @@ -21,8 +21,8 @@ PMPATH2 = /usr/lib64/pm-utils/sleep.d |
| PMPATHD = /usr/lib/systemd/system-sleep |
| |
| PKG_CONFIG ?= pkg-config |
| -CFLAGS += -O2 -I. -Wall $(shell $(PKG_CONFIG) --cflags glib-2.0) -Wno-stringop-truncation -Wmissing-prototypes -Wmissing-declarations -Wformat-security # -DNOPERFEVENT # -DHTTPSTATS |
| -LDFLAGS += $(shell $(PKG_CONFIG) --libs glib-2.0) |
| +override CFLAGS += -O2 -I. -Wall $(shell $(PKG_CONFIG) --cflags glib-2.0) -Wno-stringop-truncation -Wmissing-prototypes -Wmissing-declarations -Wformat-security # -DNOPERFEVENT # -DHTTPSTATS |
| +override LDFLAGS += $(shell $(PKG_CONFIG) --libs glib-2.0) |
| OBJMOD0 = version.o |
| OBJMOD1 = various.o deviate.o procdbase.o |
| OBJMOD2 = acctproc.o photoproc.o photosyst.o cgroups.o rawlog.o ifprop.o parseable.o |