File tree Expand file tree Collapse file tree 4 files changed +55
-12
lines changed Expand file tree Collapse file tree 4 files changed +55
-12
lines changed Original file line number Diff line number Diff line change 4
4
/.vscode /*
5
5
6
6
build /
7
- build /*
7
+ build /*
8
+
9
+ ** /* .o
10
+ * .o
11
+ * .obj
Original file line number Diff line number Diff line change
1
+ CXX = g++
2
+ CXXFLAGS = -Wall -Wextra -std=c++17
3
+ SRC_DIR = functions
4
+ BUILD_DIR = build
5
+
6
+ SRCS = main.cpp \
7
+ $(SRC_DIR ) /ascii_show.cpp \
8
+ $(SRC_DIR ) /get_cpu_info.cpp \
9
+ $(SRC_DIR ) /get_gpu_info.cpp \
10
+ $(SRC_DIR ) /get_kernel.cpp \
11
+ $(SRC_DIR ) /get_memory_info.cpp \
12
+ $(SRC_DIR ) /get_os_info.cpp \
13
+ $(SRC_DIR ) /get_shell.cpp \
14
+ $(SRC_DIR ) /get_up_time.cpp \
15
+ $(SRC_DIR ) /get_user.cpp
16
+
17
+ OBJS = $(SRCS:.cpp=.o )
18
+ BUILD_OBJS = $(addprefix $(BUILD_DIR ) /, $(notdir $(OBJS ) ) )
19
+ TARGET = $(BUILD_DIR ) /betterfetch
20
+
21
+ all : $(BUILD_DIR ) $(TARGET )
22
+
23
+ $(BUILD_DIR ) :
24
+ mkdir -p $(BUILD_DIR )
25
+
26
+ $(TARGET ) : $(BUILD_OBJS )
27
+ $(CXX ) $(CXXFLAGS ) -o $@ $(BUILD_OBJS )
28
+
29
+ $(BUILD_DIR ) /% .o : % .cpp
30
+ $(CXX ) $(CXXFLAGS ) -c $< -o $@
31
+
32
+ $(BUILD_DIR ) /% .o : $(SRC_DIR ) /% .cpp
33
+ $(CXX ) $(CXXFLAGS ) -c $< -o $@
34
+
35
+ clean :
36
+ rm -rf $(BUILD_DIR )
37
+
38
+ .PHONY : all clean
Original file line number Diff line number Diff line change @@ -16,4 +16,4 @@ void displayAsciiArt(const std::string &filename) {
16
16
file.close ();
17
17
}
18
18
19
- // DONE! displayAsciiArt works!
19
+ // // DONE! displayAsciiArt works!
Original file line number Diff line number Diff line change 1
- #include < iostream>
2
- #include " get_cpu_info.cpp"
3
- #include " ascii_show.cpp"
4
- #include " get_os_info.cpp"
5
- #include " get_memory_info.cpp"
6
- #include " get_gpu_info.cpp"
7
- #include " get_up_time.cpp"
8
- #include " get_kernel.cpp"
9
- #include " get_user.cpp"
10
- #include " get_shell.cpp"
1
+ #pragma once
2
+ #include < string>
3
+ void displayAsciiArt (const std::string& filename);
4
+ std::string getUserName ();
5
+ std::string getOSInfo ();
6
+ std::string getKernelVersion ();
7
+ std::string getCPUInfo ();
8
+ std::string getShell ();
9
+ std::string getMemoryInfo ();
10
+ std::string getGPUInfo ();
11
+ std::string getUptime ();
You can’t perform that action at this time.
0 commit comments