Bumped version to 2.0.2
Upgraded to latest project structure
This commit is contained in:
parent
567da2fae9
commit
8aa1ea4df7
13
Makefile
13
Makefile
@ -2,8 +2,8 @@ include premake.make
|
|||||||
|
|
||||||
# git commit hash and version for this build
|
# git commit hash and version for this build
|
||||||
COMMIT-HASH != git log 2>/dev/null | sed -e '1s/^commit //;q'
|
COMMIT-HASH != git log 2>/dev/null | sed -e '1s/^commit //;q'
|
||||||
COMMIT := "const char* commit = \"$(COMMIT-HASH)\";"
|
COMMIT := "static const char* commit = \"$(COMMIT-HASH)\";"
|
||||||
VERSION := "const char* version = \"$(MAJOR).$(MINOR).$(PATCH)\";"
|
VERSION := "static const char* version = \"$(MAJOR).$(MINOR).$(PATCH)\";"
|
||||||
|
|
||||||
# some important install locations
|
# some important install locations
|
||||||
PREFIX ?= /usr/local
|
PREFIX ?= /usr/local
|
||||||
@ -36,10 +36,10 @@ CXX ?= g++
|
|||||||
CXXFLAGS += -Wshadow -Wall -Wpedantic -Wextra -Wno-unused-parameter
|
CXXFLAGS += -Wshadow -Wall -Wpedantic -Wextra -Wno-unused-parameter
|
||||||
CXXFLAGS += -g3 -fPIC
|
CXXFLAGS += -g3 -fPIC
|
||||||
ifeq ($(DEBUG), 1)
|
ifeq ($(DEBUG), 1)
|
||||||
CXXFLAGS += -D DEBUG -O0
|
CXXFLAGS += -DDEBUG -O0
|
||||||
CONFIG := debug
|
CONFIG := debug
|
||||||
else
|
else
|
||||||
CXXFLAGS += -D NDEBUG -O3
|
CXXFLAGS += -DNDEBUG -O3
|
||||||
CONFIG := release
|
CONFIG := release
|
||||||
endif
|
endif
|
||||||
|
|
||||||
@ -53,7 +53,7 @@ BIN := $(OUTDIR)/$(PROJ)
|
|||||||
SRCS += $(notdir $(wildcard src/*.cpp))
|
SRCS += $(notdir $(wildcard src/*.cpp))
|
||||||
OBJS := $(addprefix $(BUILDDIR)/, $(SRCS:.cpp=.o))
|
OBJS := $(addprefix $(BUILDDIR)/, $(SRCS:.cpp=.o))
|
||||||
DEPS := $(addprefix $(BUILDDIR)/, $(SRCS:.cpp=.dep))
|
DEPS := $(addprefix $(BUILDDIR)/, $(SRCS:.cpp=.dep))
|
||||||
HDRS ?= $(wildcard src/*.hpp)
|
HDRS ?= $(filter-out src/precomp.hpp, $(wildcard src/*.hpp))
|
||||||
MANS := $(addprefix $(PREFIX)/, $(wildcard man/man*/*))
|
MANS := $(addprefix $(PREFIX)/, $(wildcard man/man*/*))
|
||||||
|
|
||||||
# if project supports plugins, link to libdl where needed
|
# if project supports plugins, link to libdl where needed
|
||||||
@ -126,7 +126,8 @@ else
|
|||||||
$(OUTDIR)/$(REALNAME): $(OBJS)
|
$(OUTDIR)/$(REALNAME): $(OBJS)
|
||||||
endif
|
endif
|
||||||
ifeq ($(UNAME_S),Darwin)
|
ifeq ($(UNAME_S),Darwin)
|
||||||
$(CXX) -dynamiclib -o $(OUTDIR)/$(REALNAME) -current_version $(MAJOR) -compatibility_version $(MINOR) $(LDFLAGS) $(OBJS) $(LDLIBS)
|
$(CXX) -dynamiclib -o $(OUTDIR)/$(REALNAME) -install_name $(LIBDIR)/$(REALNAME) \
|
||||||
|
-current_version $(MAJOR) -compatibility_version $(MINOR) $(LDFLAGS) $(OBJS) $(LDLIBS)
|
||||||
else ifeq ($(UNAME_S),OpenBSD)
|
else ifeq ($(UNAME_S),OpenBSD)
|
||||||
$(CXX) -g -shared -Wl,-soname,$(REALNAME) -o $(OUTDIR)/$(REALNAME) $(LDFLAGS) $(OBJS) $(LDLIBS)
|
$(CXX) -g -shared -Wl,-soname,$(REALNAME) -o $(OUTDIR)/$(REALNAME) $(LDFLAGS) $(OBJS) $(LDLIBS)
|
||||||
else ifeq ($(UNAME_S),Linux)
|
else ifeq ($(UNAME_S),Linux)
|
||||||
|
@ -13,7 +13,7 @@ PRODUCT := tool
|
|||||||
# Single source of truth for version.
|
# Single source of truth for version.
|
||||||
MAJOR := 2
|
MAJOR := 2
|
||||||
MINOR := 0
|
MINOR := 0
|
||||||
PATCH := 1
|
PATCH := 2
|
||||||
|
|
||||||
# Specify desired C++ standard for this project.
|
# Specify desired C++ standard for this project.
|
||||||
CXXFLAGS += -std=c++20
|
CXXFLAGS += -std=c++20
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
#include "version.hpp"
|
#include "version.hpp"
|
||||||
#include "version.inc"
|
|
||||||
#include "commit.inc"
|
|
||||||
#include <sstream>
|
#include <sstream>
|
||||||
|
|
||||||
std::string pw_version() {
|
std::string pw_version() {
|
||||||
|
#include "version.inc"
|
||||||
|
#include "commit.inc"
|
||||||
std::ostringstream oss;
|
std::ostringstream oss;
|
||||||
oss << "pw version " << version;
|
oss << "pw version " << version;
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
|
Loading…
x
Reference in New Issue
Block a user