summaryrefslogtreecommitdiff
path: root/vendor/Makefile.am
blob: 46072c3ce35933939c2f59519823f8151bbb080a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
cmockasrc   = $(srcdir)/cmocka
# Not just '$(builddir)/cmocka', because cmocka requires an out-of-source build
cmockabuild = $(builddir)/cmocka_build
cmockadist  = $(builddir)/dist

MAINTAINERCLEANFILES = \
	$(srcdir)/Makefile.in \
	"$(cmockabuild)" \
	"$(cmockadist)"

libcmocka:
if CMOCKA_INITIALIZED
	mkdir -p $(cmockabuild) $(cmockadist)
	## Compensate for the cd in the paths
	(cd $(cmockabuild) && cmake -DCMAKE_INSTALL_PREFIX=../$(cmockadist) ../$(cmockasrc) && make && make install)
endif

check: libcmocka

clean:
	rm -rf $(cmockabuild)
	rm -rf $(cmockainstall)