Browse Source

added build info to banner

master
despair 5 years ago
parent
commit
4e67433053
  1. 5
      Makefile
  2. 9
      src/main.cpp

5
Makefile

@ -3,8 +3,9 @@ CXX = g++ @@ -3,8 +3,9 @@ CXX = g++
CC = gcc
GIT_VERSION := $(shell git describe --abbrev=4 --dirty --always --tags)
PLATFORM := $(shell g++ -dumpmachine)
CXXFLAGS = -O3 -flto=8 -std=c++14 -DVERSION=\"$(GIT_VERSION)\"
CXXFLAGS = -O3 -flto=8 -std=c++14 -DVERSION=\"$(GIT_VERSION)\" -DPLATFORM=\"$(PLATFORM)\"
CFLAGS = -O3 -flto=8 -std=c11 -DVERSION=\"$(GIT_VERSION)\"
CWARN = -pedantic -Wall -Wextra -Wcast-align -Wcast-qual -Wdisabled-optimization -Wformat=2 -Winit-self -Wlogical-op -Wmissing-declarations -Wmissing-include-dirs -Wredundant-decls -Wshadow -Wsign-conversion -Wstrict-overflow=5 -Wswitch-default -Wundef -Wno-unused
WARNINGS = -Werror -pedantic -Wall -Wextra -Wcast-align -Wcast-qual -Wctor-dtor-privacy -Wdisabled-optimization -Wformat=2 -Winit-self -Wlogical-op -Wmissing-declarations -Wmissing-include-dirs -Wnoexcept -Wold-style-cast -Woverloaded-virtual -Wredundant-decls -Wshadow -Wsign-conversion -Wsign-promo -Wstrict-null-sentinel -Wstrict-overflow=5 -Wswitch-default -Wundef -Wno-unused -Wzero-as-null-pointer-constant -Wuseless-cast
@ -13,7 +14,7 @@ LDFLAGS = -O3 -flto=8 @@ -13,7 +14,7 @@ LDFLAGS = -O3 -flto=8
INCPATH = -I /usr/include/freetype2 -I /usr/include/harfbuzz
ifeq ($(UNAME), Darwin)
CXXFLAGS = -O3 -std=c++1y -DVERSION=\"$(GIT_VERSION)\"
CXXFLAGS = -O3 -std=c++1y -DVERSION=\"$(GIT_VERSION)\" -DPLATFORM\"$(PLATFORM)\"
CFLAGS = -O3 -std=c11 -DVERSION=\"$(GIT_VERSION)\"
WARNINGS =
CWARN =

9
src/main.cpp

@ -9,6 +9,13 @@ @@ -9,6 +9,13 @@
#include <iostream>
#include <sys/stat.h>
#if defined(_WIN32) && !defined(_WIN64)
#define PLATFORM "i686-pc-winnt"
#endif
#ifdef _WIN64
#define PLATFORM "amd64-pc-winnt"
#endif
const std::unique_ptr<Window> window = std::make_unique<Window>();
//URL currentURL;
@ -53,7 +60,7 @@ int main(int argc, char *argv[]) { @@ -53,7 +60,7 @@ int main(int argc, char *argv[]) {
return 1;
}
*/
std::cout << "/g/ntr - NetRunner build " << __DATE__ << std::endl;
std::cout << "/g/ntr - NetRunner build " << __DATE__ << ": rev-" << VERSION << " for " << PLATFORM << std::endl;
// we need to set up OGL before we can setDOM (because component can't be constructed (currently) without OGL)
// but should be after CommandLineParams incase we need to change some type of window config

Loading…
Cancel
Save