Browse Source

nicer

pull/1/head
Volker Birk 2 years ago
parent
commit
8194c26ba6
2 changed files with 13 additions and 4 deletions
  1. +11
    -4
      Makefile
  2. +2
    -0
      test_webserver.cc

+ 11
- 4
Makefile View File

@ -1,18 +1,19 @@
# this ifeq is not optional, because otherwise local.conf would always be built
ifeq ($(wildcard local.conf),local.conf)
-include local.conf
endif
PREFIX?=$(HOME)
BOOST_INCLUDE?=$(HOME)/dev/boost_1_72_0
BOOST_LIB?=$(HOME)/dev/boost_1_72_0/stage/lib
SIGNING_IDENTITY?=68AD28395D8090C2A8ACDD3A31FA6735C8DAE2F4
AR?=ar
CC?=cc
CXX?=c++
CFLAGS+=-std=c11
CXXFLAGS+=-I$(BOOST_INCLUDE) -std=c++11
LDFLAGS+=-L$(BOOST_LIB) -lboost_regex -lboost_filesystem
LDFLAGS+=$(BOOST_LIB)/libboost_regex.a $(BOOST_LIB)/libboost_filesystem.a
ifdef NDEBUG
CFLAGS+=-O3 -DNDEBUG
@ -68,3 +69,9 @@ uninstall:
clean:
rm -f *.o *.d *.d.* $(TARGET) $(TESTS)
local.conf:
@echo writing local.conf
@echo 'PREFIX=$$(HOME)' > local.conf
@echo 'BOOST_INCLUDE=$(BOOST_INCLUDE)' >> local.conf
@echo 'BOOST_LIB=$(BOOST_LIB)' >> local.conf

+ 2
- 0
test_webserver.cc View File

@ -5,7 +5,9 @@
int main()
{
std::cout << "starting webserver\n";
pEp::Webserver web{net::ip::address::from_string("127.0.0.1"), 8080, "htdocs"};
std::cout << "listening on localhost.8080\n";
web.run();
return 0;
}


Loading…
Cancel
Save