Makefile: fix version extraction

Regression introduced by cc59fcf.
This commit is contained in:
Přemysl Eric Janouch 2021-07-07 20:55:18 +02:00
parent fdb338fe12
commit e7da32160c
Signed by: p
GPG Key ID: A0420B94F92B9493
1 changed files with 2 additions and 2 deletions

View File

@ -1,8 +1,8 @@
.POSIX:
SHELL = /bin/sh
CXXFLAGS = -g -std=c++14 -Wall -Wextra -pedantic
CPPFLAGS = `sed -ne 's/^project (\([^ )]*\).*/-DPROJECT_NAME="\1"/p' \
-e 's/^set (version \([^ )]*\).*/-DPROJECT_VERSION="\1"/p' CMakeLists.txt`
CPPFLAGS = `sed -ne '/^project (\([^ )]*\) VERSION \([^ )]*\).*/ \
s//-DPROJECT_NAME="\1" -DPROJECT_VERSION="\2"/p' CMakeLists.txt`
sdn: sdn.cpp CMakeLists.txt
$(CXX) $(CXXFLAGS) $(CPPFLAGS) $< -o sdn \