forked from NetApp/zufs-zus
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
53 lines (47 loc) · 1.21 KB
/
Makefile
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
# SPDX-License-Identifier: BSD-3-Clause
#
# Makefile for the zus user-mode application
#
# Copyright (C) 2018 NetApp, Inc. All rights reserved.
#
# See module.c for LICENSE details.
#
# Authors:
# Omer Caspi <[email protected]>
ifeq ($(M),)
-include .config
MAKEFLAGS := --no-print-directory
LIBFS_DIRS := $(addprefix fs/,$(CONFIG_LIBFS_MODULES))
LIBFS_CLEAN := $(addprefix clean_,$(CONFIG_LIBFS_MODULES))
core:
@echo "Building ZUS library"
@$(MAKE) -f zuslib.mk
@echo "Building ZUS daemon"
@$(MAKE) -f zusd.mk
clean: $(LIBFS_CLEAN)
@echo "Cleaning ZUS core"
@$(MAKE) -f zuslib.mk __clean
@$(MAKE) -f zusd.mk __clean
$(CONFIG_LIBFS_MODULES): core
@echo "Building $@ ZUS FS module"
@$(MAKE) M=fs/$@ -C $(CURDIR) module
clean_%:
$(eval NAME := $(patsubst clean_%,%,$(@)))
@echo "Cleaning $(NAME) ZUS FS module"
@$(MAKE) M=fs/$(NAME) -C $(CURDIR) module_clean
all: core $(CONFIG_LIBFS_MODULES)
install:
pkg/install.sh
rpm deb:
pkg/create_pkg.sh $@
cscope:
find . -type f -name '*.[c|h]' > cscope.files
find . -type l -name '*.[c|h]' -exec realpath \
--relative-to=$(CURDIR) '{}' \; >> cscope.files
cscope -bcqR
.PHONY: install rpm deb all clean cscope
.NOTPARALLEL:
.DEFAULT_GOAL := all
else
include zusmodule.mk
endif