summaryrefslogtreecommitdiff
path: root/testing/scripts/recipes/002_tnc-fhh.mk
blob: d4ed4f99c2d05425915f9190b7929ab64762dea7 (plain)
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
#!/usr/bin/make

PKG = fhhtnc
SRC = git://github.com/trustatfhh/tnc-fhh.git

NUM_CPUS := $(shell getconf _NPROCESSORS_ONLN)

CONFIG_OPTS = \
	-DCOMPONENT=all \
	-DNAL=8021x

PATCHES = \
	tnc-fhh-tncsim

all: install

.$(PKG)-cloned:
	git clone $(SRC) $(PKG)
	mkdir $(PKG)/build
	@touch $@

.$(PKG)-patches-applied: .$(PKG)-cloned
	cd $(PKG) && cat $(addprefix ../patches/, $(PATCHES)) | patch -p1
	@touch $@

.$(PKG)-configured: .$(PKG)-patches-applied
	cd $(PKG)/build && cmake $(CONFIG_OPTS) ../
	@touch $@

.$(PKG)-built: .$(PKG)-configured
	cd $(PKG)/build && make -j $(NUM_CPUS)
	@touch $@

install: .$(PKG)-built
	cd $(PKG)/build && make install