28dcbd8a2c
Started calling it a status bar rather than just a bar now.
Inventing our own format, because:
- tmux doesn't have quite enough useful variables,
besides #h/#{host_short}, #{USER}, and perhaps #{PWD}.
- zsh uses weird names for everything.
- bash uses mildly inconvenient \escapes, and lacks formatting.
Also bumping C++ to 17, because the project already requires it
to build anyway (it's a relict from the time of sdn's conception).
27 lines
860 B
Makefile
27 lines
860 B
Makefile
.POSIX:
|
|
SHELL = /bin/sh
|
|
CXXFLAGS = -g -std=c++17 -Wall -Wextra -Wno-misleading-indentation -pedantic
|
|
CPPFLAGS = `sed -ne '/^project (\([^ )]*\) VERSION \([^ )]*\).*/ \
|
|
s//-DPROJECT_NAME="\1" -DPROJECT_VERSION="\2"/p' CMakeLists.txt`
|
|
|
|
sdn: sdn.cpp CMakeLists.txt
|
|
$(CXX) $(CXXFLAGS) $(CPPFLAGS) $< -o $@ \
|
|
-lacl `pkg-config --libs --cflags ncursesw`
|
|
|
|
sdn-static: sdn.cpp CMakeLists.txt
|
|
$(CXX) $(CXXFLAGS) $(CPPFLAGS) $< -o $@ \
|
|
-static -lacl `pkg-config --static --libs --cflags ncursesw`
|
|
|
|
# Works for Debian derivatives and Alpine, resulting in only a libc dependency.
|
|
sdn-portable: sdn.cpp CMakeLists.txt
|
|
$(CXX) $(CXXFLAGS) $(CPPFLAGS) $< -o $@ \
|
|
-static-libstdc++ -static-libgcc \
|
|
-Wl,--start-group,-Bstatic \
|
|
-lacl `pkg-config --static --libs --cflags ncursesw` \
|
|
-Wl,--end-group,-Bdynamic
|
|
|
|
clean:
|
|
rm -f sdn sdn-static sdn-portable
|
|
|
|
.PHONY: clean
|