-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
btw the previous commit that was commited by "--set" actually it was BurntRanch, lmaooo
- Loading branch information
1 parent
bae7443
commit 8623ce6
Showing
6 changed files
with
137 additions
and
24 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
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 |
---|---|---|
@@ -0,0 +1,68 @@ | ||
CXX ?= g++ | ||
PREFIX ?= . | ||
VARS ?= | ||
GUI_SUPPORT ?= 0 | ||
|
||
DEBUG ?= 1 | ||
PARSER_TEST ?= 0 | ||
VENDOR_TEST ?= 0 | ||
# https://stackoverflow.com/a/1079861 | ||
# WAY easier way to build debug and release builds | ||
ifeq ($(DEBUG), 1) | ||
BUILDDIR = build\debug | ||
CXXFLAGS := -ggdb3 -Wall -DDEBUG=1 $(DEBUG_CXXFLAGS) $(CXXFLAGS) | ||
else | ||
BUILDDIR = build\release | ||
endif | ||
|
||
ifeq ($(PARSER_TEST), 1) | ||
VARS += -DPARSER_TEST=1 | ||
endif | ||
|
||
ifeq ($(VENDOR_TEST), 1) | ||
VARS += -DVENDOR_TEST=1 | ||
endif | ||
|
||
ifeq ($(GUI_SUPPORT), 1) | ||
VARS += -DGUI_SUPPORT=1 | ||
LDFLAGS += `pkg-config --libs gtkmm-3.0` | ||
CXXFLAGS += `pkg-config --cflags gtkmm-3.0` | ||
endif | ||
|
||
NAME = customfetch | ||
TARGET = cufetch | ||
VERSION = 0.1.0 | ||
BRANCH = windows | ||
SRC = src\config.cpp src\display.cpp src\main.cpp src\parse.cpp src\util.cpp \ | ||
src\query\windows\cpu.cpp src\query\windows\disk.cpp src\query\windows\gpu.cpp \ | ||
src\query\windows\ram.cpp src\query\windows\system.cpp src\query\windows\user.cpp | ||
ifeq ($(GUI_SUPPORT), 1) | ||
SRC += src\gui.cpp | ||
endif | ||
OBJ = $(SRC:.cpp=.o) | ||
LDFLAGS += -L.\$(BUILDDIR)\fmt -lfmt | ||
CXXFLAGS ?= -mtune=generic -march=native | ||
CXXFLAGS += -Wno-ignored-attributes -funroll-all-loops -fvisibility=hidden -Iinclude -std=c++17 $(VARS) -DVERSION=\"$(VERSION)\" -DBRANCH=\"$(BRANCH)\" | ||
|
||
all: fmt toml $(TARGET) | ||
|
||
fmt: | ||
ifeq ($(wildcard $(BUILDDIR)\fmt\libfmt.a),) | ||
if not exist $(BUILDDIR)\fmt md $(BUILDDIR)\fmt | ||
make -C src\fmt -f Makefile.windows BUILDDIR=$(BUILDDIR)\fmt | ||
endif | ||
|
||
toml: | ||
ifeq ($(wildcard $(BUILDDIR)\toml++\toml.o),) | ||
if not exist $(BUILDDIR)\toml++ md $(BUILDDIR)\toml++ | ||
make -C src\toml++ -f Makefile.windows BUILDDIR=$(BUILDDIR)\toml++ | ||
endif | ||
|
||
$(TARGET): fmt toml $(OBJ) | ||
if not exist $(BUILDDIR) md $(BUILDDIR) | ||
$(CXX) $(OBJ) $(BUILDDIR)\toml++\toml.o -o $(BUILDDIR)\$(TARGET) $(LDFLAGS) $(CXXFLAGS) | ||
|
||
clean: | ||
del $(BUILDDIR)\$(TARGET) $(OBJ) $(BUILDDIR) | ||
|
||
.PHONY: $(TARGET) fmt toml clean all |
Empty file.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
# Variables taken from {fmt} cmake build files | ||
# I don't wanna use cmake | ||
# cmd: cmake .. -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=OFF | ||
|
||
CXX ?= g++ | ||
#CXX_DEFINES = -DFMT_LIB_EXPORT -Dfmt_EXPORTS | ||
CXX_INCLUDES = -I..\..\include | ||
CXX_FLAGS = -O3 -DNDEBUG -fvisibility=hidden -fvisibility-inlines-hidden | ||
|
||
all: fmt | ||
|
||
fmt: format.cc os.cc | ||
$(CXX) $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -c format.cc -o format.cc.o | ||
$(CXX) $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -c os.cc -o os.cc.o | ||
ar qc libfmt.a os.cc.o format.cc.o | ||
ranlib libfmt.a | ||
move libfmt.a ../../$(BUILDDIR)/libfmt.a | ||
|
||
clean: | ||
del *.o *.so *.a ..\..\$(BUILDDIR)\fmt\.*a | ||
|
||
.PHONY: clean all fmt |
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 |
---|---|---|
@@ -0,0 +1,14 @@ | ||
CXX ?= g++ | ||
SRC = toml.cpp | ||
TARGET = toml.o | ||
CPPFLAGS = -I..\..\include -std=c++20 | ||
|
||
all: $(TARGET) | ||
|
||
$(TARGET): | ||
${CXX} $(SRC) $(CPPFLAGS) -c -o ..\..\$(BUILDDIR)\$@ | ||
|
||
clean: | ||
del ..\..\$(BUILDDIR)\toml++\$(TARGET) | ||
|
||
.PHONY: $(TARGET) clean all |