-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
44 lines (34 loc) · 885 Bytes
/
Makefile
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
CC = gcc
LIB = -ldl
VERSION = 1
MIN_VERSION = 0
RELEASE_VERSION = 0
NAME=libbee.so
LIBNAME=$(NAME).$(VERSION)
LIB_PATH=/usr/lib
CC_LIB = $(CC) -shared -Wl,-soname,$(LIBNAME)
CC_DEBUG_FLAG = -DDEBUG
CC_DEBUG =
ifeq ($(DEBUG), yes)
CC_DEBUG = $(CC_DEBUG_FLAG)
endif
export CC_DEBUG
build: atoken-build bee-build oo-build
atoken-build:
cd atoken && $(MAKE)
bee-build:
cd bee && $(MAKE)
oo-build:
cd oo-bee && $(MAKE)
#reverse-tests-build:
# cd reverse-tests && $(MAKE)
lib: build
$(CC_LIB) -o $(LIBNAME).$(MIN_VERSION).$(RELEASE_VERSION) atoken/*.o bee/*.o oo-bee/*.o
install: lib
cp $(LIBNAME).$(MIN_VERSION).$(RELEASE_VERSION) $(LIB_PATH)/$(LIBNAME)
if [ ! -f $(LIB_PATH)/$(NAME) ]; then ln -s $(LIB_PATH)/$(LIBNAME) $(LIB_PATH)/$(NAME); fi
clean:
cd atoken && $(MAKE) clean
cd bee && $(MAKE) clean
cd oo-bee && $(MAKE) clean
#cd reverse-tests && $(MAKE) clean