170 lines
6.4 KiB
Text
170 lines
6.4 KiB
Text
LOCALBASE?= /usr/local
|
|
CXXFLAGS+= -std=c++14 -Wall -Wextra -Wno-unused-parameter -DSPDLOG_FMT_EXTERNAL=1
|
|
CPPFLAGS+= -I. -I../include -I../api -I$(LOCALBASE)/include \
|
|
-DNDEBUG -DENVOY_SSL_VERSION=\"BoringSSL\" \
|
|
-DBUILD_SCM_REVISION=\"e95ef6b\" \
|
|
-DBUILD_SCM_STATUS=\"Modified\"
|
|
LDFLAGS+= -L$(LOCALBASE)/lib -lfmt
|
|
CCACHE?= $(shell command -v ccache)
|
|
|
|
api_OBJS= ../api/envoy/admin/v2alpha/certs.pb.o \
|
|
../api/envoy/admin/v2alpha/clusters.pb.o \
|
|
../api/envoy/admin/v2alpha/config_dump.pb.o \
|
|
../api/envoy/admin/v2alpha/memory.pb.o \
|
|
../api/envoy/admin/v2alpha/metrics.pb.o \
|
|
../api/envoy/admin/v2alpha/mutex_stats.pb.o \
|
|
../api/envoy/admin/v2alpha/server_info.pb.o \
|
|
../api/envoy/api/v2/auth/cert.pb.o \
|
|
../api/envoy/api/v2/cds.pb.o \
|
|
../api/envoy/api/v2/cluster/circuit_breaker.pb.o \
|
|
../api/envoy/api/v2/cluster/outlier_detection.pb.o \
|
|
../api/envoy/api/v2/core/address.pb.o \
|
|
../api/envoy/api/v2/core/base.pb.o \
|
|
../api/envoy/api/v2/core/config_source.pb.o \
|
|
../api/envoy/api/v2/core/grpc_service.pb.o \
|
|
../api/envoy/api/v2/core/health_check.pb.o \
|
|
../api/envoy/api/v2/core/protocol.pb.o \
|
|
../api/envoy/api/v2/discovery.pb.o \
|
|
../api/envoy/api/v2/eds.pb.o \
|
|
../api/envoy/api/v2/endpoint/endpoint.pb.o \
|
|
../api/envoy/api/v2/endpoint/load_report.pb.o \
|
|
../api/envoy/api/v2/lds.pb.o \
|
|
../api/envoy/api/v2/listener/listener.pb.o \
|
|
../api/envoy/api/v2/ratelimit/ratelimit.pb.o \
|
|
../api/envoy/api/v2/rds.pb.o \
|
|
../api/envoy/api/v2/route/route.pb.o \
|
|
../api/envoy/config/accesslog/v2/als.pb.o \
|
|
../api/envoy/config/accesslog/v2/file.pb.o \
|
|
../api/envoy/config/bootstrap/v2/bootstrap.pb.o \
|
|
../api/envoy/config/filter/accesslog/v2/accesslog.pb.o \
|
|
../api/envoy/config/filter/fault/v2/fault.pb.o \
|
|
../api/envoy/config/filter/http/fault/v2/fault.pb.o \
|
|
../api/envoy/config/filter/http/transcoder/v2/transcoder.pb.o \
|
|
../api/envoy/config/filter/network/http_connection_manager/v2/http_connection_manager.pb.o \
|
|
../api/envoy/config/filter/network/redis_proxy/v2/redis_proxy.pb.o \
|
|
../api/envoy/config/filter/network/tcp_proxy/v2/tcp_proxy.pb.o \
|
|
../api/envoy/config/metrics/v2/metrics_service.pb.o \
|
|
../api/envoy/config/metrics/v2/stats.pb.o \
|
|
../api/envoy/config/overload/v2alpha/overload.pb.o \
|
|
../api/envoy/config/rbac/v2alpha/rbac.pb.o \
|
|
../api/envoy/config/trace/v2/trace.pb.o \
|
|
../api/envoy/data/accesslog/v2/accesslog.pb.o \
|
|
../api/envoy/data/cluster/v2alpha/outlier_detection_event.pb.o \
|
|
../api/envoy/data/core/v2alpha/health_check_event.pb.o \
|
|
../api/envoy/service/accesslog/v2/als.pb.o \
|
|
../api/envoy/service/discovery/v2/ads.pb.o \
|
|
../api/envoy/service/discovery/v2/hds.pb.o \
|
|
../api/envoy/service/discovery/v2/sds.pb.o \
|
|
../api/envoy/service/load_stats/v2/lrs.pb.o \
|
|
../api/envoy/service/metrics/v2/metrics_service.pb.o \
|
|
../api/envoy/service/ratelimit/v2/rls.pb.o \
|
|
../api/envoy/type/matcher/metadata.pb.o \
|
|
../api/envoy/type/matcher/number.pb.o \
|
|
../api/envoy/type/matcher/string.pb.o \
|
|
../api/envoy/type/matcher/value.pb.o \
|
|
../api/envoy/type/percent.pb.o \
|
|
../api/envoy/type/range.pb.o \
|
|
../api/gogoproto/gogo.pb.o \
|
|
../api/google/api/annotations.pb.o \
|
|
../api/google/api/http.pb.o \
|
|
../api/google/rpc/status.pb.o \
|
|
../api/metrics.pb.o \
|
|
../api/src/proto/grpc/health/v1/health.pb.o \
|
|
../api/validate/validate.pb.o
|
|
|
|
source_OBJS= $(common_SRCS:.cc=.o) \
|
|
$(exe_SRCS:.cc=.o) \
|
|
$(extensions_SRCS:.cc=.o) \
|
|
$(server_SRCS:.cc=.o)
|
|
|
|
common_SRCS= $(wildcard common/access_log/*.cc) \
|
|
common/api/api_impl.cc \
|
|
common/api/os_sys_calls_impl.cc \
|
|
$(wildcard common/buffer/*.cc) \
|
|
$(wildcard common/chromium_url/*.cc) \
|
|
$(wildcard common/common/*.cc) \
|
|
common/common/posix/thread_impl.cc \
|
|
$(wildcard common/config/*.cc) \
|
|
$(wildcard common/event/*.cc) \
|
|
$(wildcard common/filesystem/*.cc) \
|
|
common/filesystem/kqueue/watcher_impl.cc \
|
|
$(wildcard common/filesystem/posix/*.cc) \
|
|
$(wildcard common/grpc/*.cc) \
|
|
common/html/utility.cc \
|
|
$(wildcard common/http/*.cc) \
|
|
$(wildcard common/http/http1/*.cc) \
|
|
$(wildcard common/http/http2/*.cc) \
|
|
$(wildcard common/init/*.cc) \
|
|
$(wildcard common/json/*.cc) \
|
|
$(wildcard common/memory/*.cc) \
|
|
$(wildcard common/network/*.cc) \
|
|
common/profiler/profiler.cc \
|
|
common/protobuf/utility.cc \
|
|
$(wildcard common/router/*.cc) \
|
|
$(wildcard common/runtime/*.cc) \
|
|
$(wildcard common/secret/*.cc) \
|
|
$(wildcard common/singleton/*.cc) \
|
|
$(wildcard common/ssl/*.cc) \
|
|
$(wildcard common/stats/*.cc) \
|
|
$(wildcard common/stream_info/*.cc) \
|
|
common/tcp/conn_pool.cc \
|
|
common/thread/thread_factory_singleton.cc \
|
|
common/thread_local/thread_local_impl.cc \
|
|
common/tracing/http_tracer_impl.cc \
|
|
$(wildcard common/upstream/*.cc)
|
|
|
|
exe_SRCS= $(wildcard exe/*.cc)
|
|
|
|
extensions_SRCS=\
|
|
extensions/filters/common/rbac/matchers.cc \
|
|
$(wildcard extensions/transport_sockets/tls/*.cc) \
|
|
$(wildcard extensions/access_loggers/*/*.cc) \
|
|
$(wildcard extensions/stat_sinks/metrics_service/*.cc)
|
|
|
|
server_SRCS= $(wildcard server/config_validation/*.cc) \
|
|
server/configuration_impl.o \
|
|
server/connection_handler_impl.o \
|
|
server/drain_manager_impl.o \
|
|
server/guarddog_impl.cc \
|
|
server/http/admin.o \
|
|
server/http/config_tracker_impl.o \
|
|
server/lds_api.o \
|
|
server/listener_manager_impl.o \
|
|
server/options_impl.cc \
|
|
server/options_impl_platform_default.o \
|
|
server/overload_manager_impl.o \
|
|
server/proto_descriptors.cc \
|
|
server/server.o \
|
|
server/watchdog_impl.o \
|
|
server/worker_impl.o
|
|
|
|
%.o: %.cc
|
|
$(CCACHE) $(CXX) $(CXXFLAGS) $(CPPFLAGS) -o $@ -c $<
|
|
|
|
LIBS= $(LOCALBASE)/lib/libabsl_bad_optional_access.a \
|
|
$(LOCALBASE)/lib/libabsl_base.a \
|
|
$(LOCALBASE)/lib/libabsl_city.a \
|
|
$(LOCALBASE)/lib/libabsl_graphcycles_internal.a \
|
|
$(LOCALBASE)/lib/libabsl_hash.a \
|
|
$(LOCALBASE)/lib/libabsl_hashtablez_sampler.a \
|
|
$(LOCALBASE)/lib/libabsl_int128.a \
|
|
$(LOCALBASE)/lib/libabsl_malloc_internal.a \
|
|
$(LOCALBASE)/lib/libabsl_raw_hash_set.a \
|
|
$(LOCALBASE)/lib/libabsl_spinlock_wait.a \
|
|
$(LOCALBASE)/lib/libabsl_stacktrace.a \
|
|
$(LOCALBASE)/lib/libabsl_strings.a \
|
|
$(LOCALBASE)/lib/libabsl_symbolize.a \
|
|
$(LOCALBASE)/lib/libabsl_synchronization.a \
|
|
$(LOCALBASE)/lib/libabsl_throw_delegate.a \
|
|
$(LOCALBASE)/lib/libabsl_time.a \
|
|
$(LOCALBASE)/lib/libabsl_time_zone.a \
|
|
-lcares -lcircllhist -lcrypto -levent -levent_pthreads -lgpr \
|
|
-lgrpc++ -lhttp_parser -lnghttp2 -lprotobuf -lpthread -lssl \
|
|
-lxxhash -lyaml-cpp
|
|
|
|
envoy: $(api_OBJS) $(source_OBJS)
|
|
$(CXX) $(LDFLAGS) -o $@ $^ $(LIBS)
|
|
|
|
all: envoy
|
|
|
|
.PHONY: all install
|