]> git.proxmox.com Git - ceph.git/blob - ceph/src/spdk/ocf/tests/build/Makefile
470cf667bdd18782efc4600ec569f94bdb49afd9
[ceph.git] / ceph / src / spdk / ocf / tests / build / Makefile
1 #
2 # Copyright(c) 2019 Intel Corporation
3 # SPDX-License-Identifier: BSD-3-Clause-Clear
4 #
5
6 #
7 # This Makefile performs basic build test of OCF with posix environment.
8 # It doesn't generate any final executable, but just compiles every
9 # single *.c file into *.o object, to check if compilation succeeds.
10 #
11 # It's intended to be used as part of CI process.
12 #
13
14 OCFDIR=../../
15 SRCDIR=src/
16 INCDIR=include/
17
18 SRC=$(shell find ${SRCDIR} -name \*.c)
19 OBJS = $(patsubst %.c, %.o, $(SRC))
20 CFLAGS = -Wall -Werror -I${INCDIR} -I${SRCDIR}/ocf/env/
21
22 all: sync
23 $(MAKE) build
24
25 build: $(OBJS)
26
27 sync:
28 @$(MAKE) -C ${OCFDIR} inc O=$(PWD)
29 @$(MAKE) -C ${OCFDIR} src O=$(PWD)
30 @$(MAKE) -C ${OCFDIR} env O=$(PWD) ENV=posix
31
32 clean:
33 @rm -rf $(OBJS)
34
35 distclean:
36 @rm -rf $(OBJS)
37 @rm -rf src/ocf
38 @rm -rf include/ocf
39
40 .PHONY: all build sync clean distclean