Rename pharos-dashboard and pharos-validator
[pharos-tools.git] / validator / Makefile
1 ##############################################################################
2 # Copyright (c) 2015 Todd Gaunt and others.
3 #
4 # All rights reserved. This program and the accompanying materials
5 # are made available under the terms of the Apache License, Version 2.0
6 # which accompanies this distribution, and is available at
7 # http://www.apache.org/licenses/LICENSE-2.0
8 ##############################################################################
9
10 include config.mk
11
12 # Variables passed down to subfolder make commands
13 export DESTDIR
14 export PREFIX
15
16 SHELL=/bin/sh
17
18 # Source paths
19 SRCDIR="src/"
20 PXE_INITRD=${SRCDIR}/pxe_initrd/
21 VALIDATION_TOOL=${SRCDIR}/validation_tool/
22
23 # makefile names
24 PXE_MAKE=pxe_initrd.mk
25
26
27 all: validation_tool pxe_initrd
28
29 ##########################################
30 # The following forces rebuilding
31 ##########################################
32 .PHONY: validation_tool ${VALIDATION_TOOL}
33 validation_tool: ${VALIDATION_TOOL}
34
35 ${VALIDATION_TOOL}:
36         pushd $@ && ./setup.py build && popd
37
38 ##########################################
39 # The following forces rebuilding
40 ##########################################
41 .PHONY: pxe_initrd ${PXE_INITRD}
42 pxe_initrd: ${PXE_INITRD}
43
44 ${PXE_INITRD}:
45         ${MAKE} -C $@ -f ${PXE_MAKE} all
46 ##########################################
47
48 install: all
49         # Install the programs to the passed in PREFIX dir
50         ${MAKE} -C ${PXE_INITRD} -f ${PXE_MAKE} install
51         pushd ${VALIDATION_TOOL} && ./setup.py install --prefix=${DESTDIR}/${PREFIX} && popd
52
53 .PHONY: clean
54 clean:
55         ${MAKE} -C ${PXE_INITRD} -f ${PXE_MAKE} clean
56         pushd ${VALIDATION_TOOL} && ./setup.py clean --all && popd