Skip to content

Commit 99d88c3

Browse files
DerDakondlezcano
authored andcommitted
thermal/tools/tmon: Improve the Makefile
- Remove empty macros assignments - Use directory creation parameter for the install tool - Use $OBJ instead of building the list of object for the 'clean' target [dlezcano] : Changed title and description Signed-off-by: Rolf Eike Beer <[email protected]> Signed-off-by: Daniel Lezcano <[email protected]> Link: https://lore.kernel.org/r/1951386.ZPQrlMDjM2@devpool47
1 parent 21c1e43 commit 99d88c3

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

tools/thermal/tmon/Makefile

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ CC?= $(CROSS_COMPILE)gcc
1313
PKG_CONFIG?= pkg-config
1414

1515
override CFLAGS+=-D VERSION=\"$(VERSION)\"
16-
LDFLAGS+=
1716
TARGET=tmon
1817

1918
INSTALL_PROGRAM=install -m 755 -p
@@ -33,7 +32,6 @@ override CFLAGS += $(shell $(PKG_CONFIG) --cflags $(STATIC) panelw ncursesw 2> /
3332
$(PKG_CONFIG) --cflags $(STATIC) panel ncurses 2> /dev/null)
3433

3534
OBJS = tmon.o tui.o sysfs.o pid.o
36-
OBJS +=
3735

3836
tmon: $(OBJS) Makefile tmon.h
3937
$(CC) $(CFLAGS) $(LDFLAGS) $(OBJS) -o $(TARGET) $(TMON_LIBS)
@@ -42,15 +40,13 @@ valgrind: tmon
4240
sudo valgrind -v --track-origins=yes --tool=memcheck --leak-check=yes --show-reachable=yes --num-callers=20 --track-fds=yes ./$(TARGET) 1> /dev/null
4341

4442
install:
45-
- mkdir -p $(INSTALL_ROOT)/$(BINDIR)
46-
- $(INSTALL_PROGRAM) "$(TARGET)" "$(INSTALL_ROOT)/$(BINDIR)/$(TARGET)"
43+
- $(INSTALL_PROGRAM) -D "$(TARGET)" "$(INSTALL_ROOT)/$(BINDIR)/$(TARGET)"
4744

4845
uninstall:
4946
$(DEL_FILE) "$(INSTALL_ROOT)/$(BINDIR)/$(TARGET)"
5047

5148
clean:
52-
find . -name "*.o" | xargs $(DEL_FILE)
53-
rm -f $(TARGET)
49+
rm -f $(TARGET) $(OBJS)
5450

5551
dist:
5652
git tag v$(VERSION)

0 commit comments

Comments
 (0)