File: deps.mk

package info (click to toggle)
coz-profiler 0.1.0-2
  • links: PTS, VCS
  • area: main
  • in suites: buster, sid
  • size: 11,040 kB
  • ctags: 2,459
  • sloc: cpp: 6,829; ansic: 1,810; makefile: 249; python: 105; sh: 72
file content (23 lines) | stat: -rw-r--r-- 804 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
# Targets to fetch and build external dependencies

GIT = git

# Get and build libelfin
$(ROOT)/deps/libelfin: $(ROOT)/deps/libelfin/elf/libelf++.a

$(ROOT)/deps/libelfin/Makefile:
	@echo $(LOG_PREFIX) Checking out libelfin $(LOG_SUFFIX)
	@mkdir -p $(ROOT)/deps
	@$(GIT) clone git://github.com/aclements/libelfin $(ROOT)/deps/libelfin

$(ROOT)/deps/libelfin/elf/libelf++.a: $(ROOT)/deps/libelfin/Makefile
	@echo $(LOG_PREFIX) Building libelfin $(LOG_SUFFIX)
	@cd $(ROOT)/deps/libelfin; make MAKEFLAGS="-j1" CC=$(CC) CXX=$(CXX)

# Update build settings to include libelfin libraries
ifneq (,$(findstring libelfin,$(PREREQS)))
LDFLAGS += -L$(ROOT)/deps/libelfin/elf \
					 -L$(ROOT)/deps/libelfin/dwarf \
					 -Wl,--whole-archive -lelf++ -ldwarf++ -Wl,--no-whole-archive
CXXFLAGS += -I$(ROOT)/deps
endif