-
Notifications
You must be signed in to change notification settings - Fork 21
/
Makefile
74 lines (63 loc) · 1.75 KB
/
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
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
#
# Copyright (c) 2006-2009 by Cisco Systems, Inc.
# All Rights Reserved.
#
#
# This is the VQE-C top level Makefile which builds the VQE-C library
# and sample application. This Makefile basically descends into each
# subdirectory and calls the make from there.
#
#
# Define global variables from vqe.mk
include vqe.mk
VQEC_BUILD_ROOT= $(ROOT)/vqec_obj
LIBEVENT_SRCDIR= 3rd-party-src/libevent/libevent-1.1a/
LIBCONFIG_SRCDIR= 3rd-party-src/libconf/libconfig-1.0.1/
# VQEC targets
vqec::
@echo "Building 3rd-party libs"; \
if ! $(MAKE) -wC vqec_obj vqec_build_packages; then \
$(MAKE_K_CHECK) \
fi;
@echo "Making VQEC libs and executables"; \
if ! $(MAKE) -wC $(VQEC_BUILD_ROOT)$(SRCMODULE); then \
$(MAKE_K_CHECK) \
fi;
%-vqec::
@echo "Building 3rd-party libs"; \
if ! $(MAKE) -wC vqec_obj vqec_build_packages; then \
$(MAKE_K_CHECK) \
fi;
@echo "Making VQEC $*"; \
if ! $(MAKE) -wC $(VQEC_BUILD_ROOT)$(SRCMODULE) $*; then \
$(MAKE_K_CHECK) \
fi
##########
# Kernel module targets for VQEC.
#########
kmod-vqec::
@echo "Making VQEC kernel module"; \
if ! $(MAKE) -wC $(VQEC_BUILD_ROOT) kmod; then \
$(MAKE_K_CHECK) \
fi
%-kmod-vqec::
@echo "Making VQEC kernel module target $*-kmod"; \
if ! $(MAKE) -wC $(VQEC_BUILD_ROOT) $*-kmod; then \
$(MAKE_K_CHECK) \
fi
# Build target
all:: vqec
# clean_release cleans all VQEC targets as well as the 3rd-party-src
clean::
@echo "Cleaning VQEC and 3rd-party-src"; \
if ! $(MAKE) -wC $(VQEC_BUILD_ROOT) clean_release; then \
$(MAKE_K_CHECK) \
fi
.PHONY: install
install:
@echo "installing library and headers";\
if ! $(MAKE) -wC vqec_obj vqec_install; then \
$(MAKE_K_CHECK) \
fi;
@echo "installing .pc files"; \
$(MAKE) -wC pkgconfig install