This repository has been archived by the owner on Sep 3, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #154 from TanmayPatil105/cleanup
Reduce memory footprint of procfetch
- Loading branch information
Showing
6 changed files
with
83 additions
and
89 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
/Makefile | ||
src/config.h | ||
src/procfetch | ||
src/test | ||
src/Makefile | ||
ascii/Makefile | ||
debian/control | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,41 +1,45 @@ | ||
TARGET = procfetch | ||
SRCS = fetch.cpp main.cpp util.cpp | ||
SRCS = fetch.cpp main.cpp | ||
OBJS = $(SRCS:.cpp=.o) | ||
|
||
CXX = @CXX@ | ||
CXXFLAGS = -std=c++17 -Wall -Wextra --pedantic-errors @CXXFLAGS@ | ||
LIBS = @LIBS@ | ||
LDFLAGS = -pthread | ||
|
||
TEST_TARGET = test | ||
TEST_SRCS = test.cpp fetch.cpp | ||
TEST_OBJS = $(TEST_SRCS:.cpp=.o) | ||
TEST_LDFLAGS = $(LDFLAGS) -no-pie | ||
|
||
INSTALL = /usr/bin/install -c -D | ||
FORMATTER = clang-format -i | ||
BIN_DIR = @BIN_DIR@ | ||
|
||
all: $(TARGET) | ||
run: all | ||
./$(TARGET) | ||
check: all | ||
@if test -f not_existence; then \ | ||
echo "Error: It is assumed that file 'not_existence' DOES NOT exist." ;\ | ||
false ;\ | ||
fi | ||
./$(TARGET) -t | ||
build-test: $(TEST_TARGET) | ||
check: build-test | ||
./$(TEST_TARGET) | ||
gcov: | ||
gcov $(SRCS) | ||
gcov $(TEST_TARGET) | ||
clean: | ||
- rm -f $(TARGET) $(OBJS) *.gcov *.gcda *.gcno | ||
- rm -f $(TARGET) $(OBJS) $(TEST_TARGET) $(TEST_OBJS) *.gcov *.gcda *.gcno | ||
install: all | ||
@echo "Installing $(BIN_DIR)/$(TARGET) ..." | ||
$(INSTALL) $(TARGET) "$(BIN_DIR)/$(TARGET)" | ||
uninstall: | ||
- rm "$(BIN_DIR)/$(TARGET)" | ||
format: | ||
$(FORMATTER) $(SRCS) *.h | ||
$(FORMATTER) $(SRCS) $(TEST_TARGET) *.h | ||
|
||
$(TARGET): $(OBJS) | ||
$(CXX) -o $@ $(OBJS) $(LIBS) $(LDFLAGS) | ||
$(TEST_TARGET): $(TEST_OBJS) | ||
$(CXX) -o $@ $(TEST_OBJS) $(LIBS) $(TEST_LDFLAGS) | ||
main.o: fetch.h color.h config.h | ||
fetch.o: fetch.h color.h | ||
util.o: fetch.h color.h | ||
test.o: fetch.h color.h | ||
|
||
.PHONY: all run check gcov clean docs install uninstall dist format gif | ||
.PHONY: all run check gcov clean docs install uninstall dist format gif build-test |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters