summaryrefslogtreecommitdiff
path: root/ecp/src/ecp/common.mk
blob: 60f70874a73d816546cd6dad01fadfdced17acdd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
platform ?= posix

pwd := $(abspath $(dir $(firstword $(MAKEFILE_LIST))))
src_dir := $(abspath $(dir $(lastword $(MAKEFILE_LIST)))/..)
ssl_dir = $(abspath $(src_dir)/../../ext/libressl)
platform_dir = $(abspath $(src_dir)/platform/$(platform))

include $(platform_dir)/platform.mk
include $(platform_dir)/features.mk
CFLAGS += -I$(src_dir) -I$(platform_dir) -I$(ssl_dir)/include -I$(ssl_dir)/crypto/compat

ifeq ($(with_pthread),yes)
CFLAGS += -DECP_WITH_PTHREAD=1
endif

ifeq ($(with_htable),yes)
CFLAGS += -DECP_WITH_HTABLE=1
subdirs	+= htable
endif

ifeq ($(with_vconn),yes)
CFLAGS += -DECP_WITH_VCONN=1
subdirs	+= vconn
endif

ifeq ($(with_rbuf),yes)
CFLAGS += -DECP_WITH_RBUF=1
ext_subdir = yes
endif

ifeq ($(with_msgq),yes)
CFLAGS += -DECP_WITH_MSGQ=1
endif

ifdef ext_subdir
subdirs += ext
endif

ifeq ($(with_dir),yes)
CFLAGS += -DECP_WITH_DIR=1
subdirs	+= dir
endif

ifeq ($(with_debug),yes)
CFLAGS += -DECP_DEBUG=1
endif