Centralized makefiles for examples

This commit is contained in:
Sven Almgren
2012-03-14 12:52:55 +01:00
parent 844f34bb3a
commit f085cc63b6
13 changed files with 72 additions and 139 deletions

View File

@@ -1,14 +1,8 @@
CFLAGS = -O2
LDFLAGS =
BOOST_LIBS=boost_system boost_date_time boost_program_options boost_thread boost_regex boost_random
CXX ?= c++
SHARED ?= "1"
include ../common.mk
ifeq ($(SHARED), 1)
LDFLAGS := $(LDFLAGS) -lboost_system -lboost_thread -lpthread -lwebsocketpp
else
LDFLAGS := $(LDFLAGS) ../../libwebsocketpp.a -lboost_system -lboost_thread -lboost_date_time -lboost_regex -lboost_random -lboost_program_options -lpthread
endif
LDFLAGS := $(LDFLAGS) -lpthread
echo_client: echo_client.o
$(CXX) $(CFLAGS) $^ -o $@ $(LDFLAGS)