forked from wynne0/altibase
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathalticore.mk
81 lines (67 loc) · 2.59 KB
/
alticore.mk
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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
#####################################
# Alticore Library Setting #
#####################################
ALTICORE_HOME=$(ALTI_HOME)
ALTICORE_LIBDIR=$(ALTICORE_HOME)/lib
ifeq ($(OS_TARGET),INTEL_WINDOWS)
CFLAGS += /D_GNU_SOURCE
ifeq "$(BUILD_MODE)" "debug"
CCFLAGS += /DACP_CFG_DEBUG
CFLAGS += /DACP_CFG_DEBUG
endif
ifeq ($(compile64),1)
CCFLAGS += /DACP_CFG_COMPILE_64BIT /DACP_CFG_COMPILE_BIT=64 /DACP_CFG_COMPILE_BIT_STR="64"
CFLAGS += /DACP_CFG_COMPILE_64BIT /DACP_CFG_COMPILE_BIT=64 /DACP_CFG_COMPILE_BIT_STR="64"
else
CCFLAGS += /DACP_CFG_COMPILE_32BIT /DACP_CFG_COMPILE_BIT=32 /DACP_CFG_COMPILE_BIT_STR="32"
CFLAGS += /DACP_CFG_COMPILE_32BIT /DACP_CFG_COMPILE_BIT=32 /DACP_CFG_COMPILE_BIT_STR="32"
endif
else
CFLAGS += -D_GNU_SOURCE
ifeq "$(BUILD_MODE)" "debug"
CCFLAGS += -DACP_CFG_DEBUG
CFLAGS += -DACP_CFG_DEBUG
endif
ifeq ($(compile64),1)
CCFLAGS += -DACP_CFG_COMPILE_64BIT -DACP_CFG_COMPILE_BIT=64 -DACP_CFG_COMPILE_BIT_STR="64"
CFLAGS += -DACP_CFG_COMPILE_64BIT -DACP_CFG_COMPILE_BIT=64 -DACP_CFG_COMPILE_BIT_STR="64"
else
CCFLAGS += -DACP_CFG_COMPILE_32BIT -DACP_CFG_COMPILE_BIT=32 -DACP_CFG_COMPILE_BIT_STR="32"
CFLAGS += -DACP_CFG_COMPILE_32BIT -DACP_CFG_COMPILE_BIT=32 -DACP_CFG_COMPILE_BIT_STR="32"
endif
endif
ALTICORE_DEFINES += -D_GNU_SOURCE
ALTICORE_INCLUDES += -I$(CORE_DIR)/include
ALTICORE_LDFLAGS += -L$(ALTICORE_HOME)/lib \
-lalticore -laltictest \
-lm -lpthread -ldl -lncurses \
-rdynamic
#####################################
# alticore static library link #
#####################################
ifeq ($(OS_TARGET),INTEL_WINDOWS)
ALTICORE_STATIC_LIB=$(ALTICORE_LIBDIR)/$(LIBPRE)alticore_static.$(LIBEXT)
ALTICTEST_STATIC_LIB=$(ALTICORE_LIBDIR)/$(LIBPRE)altictest_static.$(LIBEXT)
else
ALTICORE_STATIC_LIB=$(ALTICORE_LIBDIR)/$(LIBPRE)alticore.$(LIBEXT)
ALTICTEST_STATIC_LIB=$(ALTICORE_LIBDIR)/$(LIBPRE)altictest.$(LIBEXT)
endif
ifeq ($(UNITTEST_USE_STATIC_LIB), no)
#####################################
# 1-1. default alticore library #
#####################################
ALTICORE_LIB=$(LIBOPT)alticore$(LIBAFT)
ALTICTEST_LIB=$(LIBOPT)altictest$(LIBAFT)
else
#####################################
# 1-2. alticore static library link #
#####################################
ALTICORE_LIB=$(ALTICORE_STATIC_LIB)
ALTICTEST_LIB=$(ALTICTEST_STATIC_LIB)
endif
#####################################
# 1-3. alticore shared library link #
#####################################
#ALTICORE_LIB=$(ALTICORE_LIBDIR)/$(LIBPRE)alticore.$(SOEXT)
#ALTICTEST_LIB=$(ALTICORE_LIBDIR)/$(LIBPRE)altictest.$(SOEXT)
LIBDIRS += $(LDROPT)$(ALTICORE_LIBDIR)