2020-10-23 08:16:36 +02:00
|
|
|
.POSIX:
|
2017-06-29 02:50:39 +02:00
|
|
|
SHELL = /bin/sh
|
2020-10-23 08:16:36 +02:00
|
|
|
CXXFLAGS = -g -std=c++14 -Wall -Wextra -pedantic
|
|
|
|
CPPFLAGS = `sed -ne 's/^project (\([^ )]*\).*/-DPROJECT_NAME="\1"/p' \
|
2017-06-29 02:50:39 +02:00
|
|
|
-e 's/^set (version \([^ )]*\).*/-DPROJECT_VERSION="\1"/p' CMakeLists.txt`
|
2020-10-23 08:16:36 +02:00
|
|
|
|
|
|
|
sdn: sdn.cpp CMakeLists.txt
|
|
|
|
$(CXX) $(CXXFLAGS) $(CPPFLAGS) $< -o sdn \
|
|
|
|
-lacl `pkg-config --libs --cflags ncursesw`
|
|
|
|
static: sdn.cpp CMakeLists.txt
|
|
|
|
$(CXX) $(CXXFLAGS) $(CPPFLAGS) $< -o sdn \
|
|
|
|
-static-libstdc++ \
|
|
|
|
-Wl,--start-group,-Bstatic \
|
|
|
|
-lacl `pkg-config --static --libs --cflags ncursesw` \
|
|
|
|
-Wl,--end-group,-Bdynamic
|
2017-06-29 02:50:39 +02:00
|
|
|
clean:
|
|
|
|
rm -f sdn
|
|
|
|
|
2020-10-23 08:16:36 +02:00
|
|
|
.PHONY: static clean
|