summaryrefslogtreecommitdiff
path: root/ecp/src/ecp/common.mk
blob: 9380130600c6978dd9150b1db2e21c5675cbca56 (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
47
48
49
50
51
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

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_frag),yes)
CFLAGS += -DECP_WITH_FRAG=1
ext_subdir = yes
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