[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAHp75VfZLjtAKwFWYp32YgPc_Nq6nCGpNwrXYCp-=m38+2r-Mg@mail.gmail.com>
Date: Sat, 29 Jun 2019 19:00:49 +0300
From: Andy Shevchenko <andy.shevchenko@...il.com>
To: Srinivas Pandruvada <srinivas.pandruvada@...ux.intel.com>
Cc: Darren Hart <dvhart@...radead.org>,
Andy Shevchenko <andy@...radead.org>,
Andriy Shevchenko <andriy.shevchenko@...el.com>,
Jonathan Corbet <corbet@....net>,
"Rafael J. Wysocki" <rjw@...ysocki.net>,
Alan Cox <alan@...ux.intel.com>, Len Brown <lenb@...nel.org>,
prarit@...hat.com, darcari@...hat.com,
Linux Documentation List <linux-doc@...r.kernel.org>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
Platform Driver <platform-driver-x86@...r.kernel.org>
Subject: Re: [PATCH 10/10] tools/power/x86: A tool to validate Intel Speed
Select commands
On Sat, Jun 29, 2019 at 5:53 PM Srinivas Pandruvada
<srinivas.pandruvada@...ux.intel.com> wrote:
> On Sat, 2019-06-29 at 17:31 +0300, Andy Shevchenko wrote:
> > On Thu, Jun 27, 2019 at 1:39 AM Srinivas Pandruvada
> > <srinivas.pandruvada@...ux.intel.com> wrote:
> > > +++ b/tools/power/x86/intel_speed_select/Makefile
> >
> > My experience with some tools are not good in order of their build
> > process.
> > Can this one use tools build infrastructure from the day 1?
> Can you give some pointers?
Sure.
At least simple ones are under tools/gpio, tools/iio, etc.
You may compare them to see what's different and what's common and
base Makefile here on that.
I dunno if there is any tool under tools/power to use that, it might
give an example of `descend` feature in Makefile.
> > > @@ -0,0 +1,31 @@
> > > +# SPDX-License-Identifier: GPL-2.0
> > > +CC = $(CROSS_COMPILE)gcc
> > > +BUILD_OUTPUT := $(CURDIR)
> > > +PREFIX ?= /usr
> > > +DESTDIR ?=
> > > +
> > > +override CFLAGS += -D__EXPORTED_HEADERS__ -Wall -D_GNU_SOURCE
> > > +override CFLAGS += -I$(CURDIR)/../../../../include/uapi/
> > > +override CFLAGS += -I$(CURDIR)/../../../../include/
> > > +
> > > +%: %.c
> > > + @mkdir -p $(BUILD_OUTPUT)
> > > + $(CC) $(CFLAGS) $< -o $(BUILD_OUTPUT)/$@ $(LDFLAGS)
> > > +
> > > +DEPS = isst.h
> > > +OBJ = isst_config.o isst_core.o isst_display.o
> > > +
> > > +%.o: %.c $(DEPS)
> > > + $(CC) -c -o $(BUILD_OUTPUT)/$@ $< $(CFLAGS)
> > > +
> > > +intel-speed-select: $(OBJ)
> > > + $(CC) -o $(BUILD_OUTPUT)/$@ $^ $(CFLAGS)
> > > +
> > > +.PHONY : clean
> > > +clean :
> > > + @rm -f $(BUILD_OUTPUT)/intel-speed-select
> > > + @rm -f $(BUILD_OUTPUT)/*.o
> > > +
> > > +install : intel-speed-select
> > > + install -d $(DESTDIR)$(PREFIX)/sbin
> > > + install $(BUILD_OUTPUT)/intel-speed-select
> > > $(DESTDIR)$(PREFIX)/sbin/intel-speed-select
--
With Best Regards,
Andy Shevchenko
Powered by blists - more mailing lists