Archived
1
0
This repository has been archived on 2023-08-12. You can view files and clone it, but cannot push or open issues or pull requests.
nntpchan/contrib/frontends/cpp/nntpchan-daemon/Makefile

35 lines
653 B
Makefile
Raw Normal View History

2016-10-15 18:12:01 +05:00
2016-10-15 21:37:59 +05:00
EXE = nntpd
TOOL = nntpchan-tool
2016-10-15 18:12:01 +05:00
CXX = clang++
SRC_PATH = ./src
SOURCES := $(wildcard $(SRC_PATH)/*.cpp)
HEADERS := $(wildcard $(SRC_PATH)/*.hpp)
OBJECTS := $(SOURCES:.cpp=.o)
2016-10-15 21:37:59 +05:00
PKGS := libuv libsodium
2016-10-15 18:12:01 +05:00
LD_FLAGS := $(shell pkg-config --libs $(PKGS))
INC_FLAGS := -I $(SRC_PATH) $(shell pkg-config --cflags $(PKGS))
2016-10-15 21:37:59 +05:00
CXXFLAGS := -std=c++14 -Wall -Wextra $(INC_FLAGS) -g
2016-10-15 18:12:01 +05:00
2016-10-15 21:37:59 +05:00
all: $(EXE) $(TOOL)
2016-10-15 18:12:01 +05:00
2016-10-15 21:37:59 +05:00
$(EXE): $(OBJECTS)
$(CXX) -o $(EXE) $(LD_FLAGS) $(OBJECTS) $(CXXFLAGS) nntpchan.cpp
2016-10-15 18:12:01 +05:00
2016-10-15 21:37:59 +05:00
$(TOOL): $(OBJECTS)
$(CXX) -o $(TOOL) $(LD_FLAGS) $(OBJECTS) $(CXXFLAGS) tool.cpp
2016-10-15 18:12:01 +05:00
%.o: src/%.cpp
$(CXX) $(CXXFLAGS) -c -o $@
clean:
2016-10-15 21:37:59 +05:00
rm -f $(OBJECTS) $(EXE) $(TOOL)