forked from open-iscsi/open-iscsi
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
130 lines (102 loc) · 3.54 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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
#
# Makefile for the Open-iSCSI Initiator
#
# if you are packaging open-iscsi, set this variable to the location
# that you want everything installed into.
DESTDIR ?=
prefix = /usr
exec_prefix =
mandir = $(prefix)/share/man
etcdir = /etc
SBINDIR = $(exec_prefix)/sbin
HOMEDIR = $(etcdir)/iscsi
DBROOT = $(etcdir)/iscsi
RULESDIR = $(etcdir)/udev/rules.d
INSTALL = /usr/bin/install
# pass these on to sub-Makefiles
export DESTDIR prefix INSTALL SBINDIR HOMEDIR DBROOT RULESDIR
# Compatibility: parse old OPTFLAGS argument
ifdef OPTFLAGS
CFLAGS = $(OPTFLAGS)
endif
# Export it so configure of iscsiuio will
# pick it up.
ifneq (,$(CFLAGS))
export CFLAGS
endif
# export systemd disablement if set
ifneq ($(NO_SYSTEMD),)
export NO_SYSTEMD
WITHOUT_ARG = --without-systemd
else
WITHOUT_ARG =
endif
# Random comments:
# using '$(MAKE)' instead of just 'make' allows make to run in parallel
# over multiple makefile.
all: user
make_utils:
$(MAKE) $(MFLAGS) -C utils
user: iscsiuio/Makefile
$(MAKE) $(MFLAGS) -C libopeniscsiusr
$(MAKE) $(MFLAGS) -C utils/sysdeps
$(MAKE) $(MFLAGS) -C usr
$(MAKE) $(MFLAGS) -C utils
$(MAKE) $(MFLAGS) -C etc
$(MAKE) $(MFLAGS) -C iscsiuio
$(MAKE) $(MFLAGS) -C doc
@echo
@echo "Compilation complete Output file"
@echo "----------------------------------- ----------------"
@echo "Built iSCSI daemon: usr/iscsid"
@echo "Built management application: usr/iscsiadm"
@echo "Built boot tool: usr/iscsistart"
@echo "Built iscsiuio daemon: iscsiuio/src/unix/iscsiuio"
@echo "Built libopeniscsiusr library: libopeniscsiusr/libopeniscsiusr.so"
@echo
@echo "Read README file for detailed information."
iscsiuio/Makefile: iscsiuio/configure iscsiuio/Makefile.in
cd iscsiuio; ./configure $(WITHOUT_ARG) --sbindir=$(SBINDIR)
iscsiuio/configure: iscsiuio/configure.ac iscsiuio/Makefile.am
cd iscsiuio; autoreconf --install
force: ;
clean:
$(MAKE) $(MFLAGS) -C utils/sysdeps clean
$(MAKE) $(MFLAGS) -C utils clean
$(MAKE) $(MFLAGS) -C usr clean
$(MAKE) $(MFLAGS) -C etc clean
$(MAKE) $(MFLAGS) -C libopeniscsiusr clean
[ ! -f iscsiuio/Makefile ] || $(MAKE) $(MFLAGS) -C iscsiuio clean
[ ! -f iscsiuio/Makefile ] || $(MAKE) $(MFLAGS) -C iscsiuio distclean
# this is for safety
# now -jXXX will still be safe
# note that make may still execute the blocks in parallel
.NOTPARALLEL: install_user install_programs install_initd \
install_initd_redhat install_initd_debian \
install_doc install_iname install_etc install_etc_all
install: install_programs install_doc \
install_systemd install_iname install_libopeniscsiusr \
install_iscsiuio install_etc_all
install_iscsiuio:
$(MAKE) $(MFLAGS) -C iscsiuio install
install_user: install_programs install_doc install_systemd install_iname
install_udev_rules:
$(MAKE) $(MFLAGS) -C utils $@
install_programs:
$(MAKE) $(MFLAGS) -C utils install
$(MAKE) $(MFLAGS) -C usr install
install_initd install_initd_redhat install_initd_debian install_iface install_systemd install_etc install_iname:
$(MAKE) $(MFLAGS) -C etc $@
install_etc_all:
$(MAKE) $(MFLAGS) -C etc install
install_doc:
$(MAKE) $(MFLAGS) -C doc $@
install_libopeniscsiusr:
$(MAKE) $(MFLAGS) -C libopeniscsiusr install
depend:
for dir in usr utils utils/fwparam_ibft utils/sysdeps; do \
$(MAKE) $(MFLAGS) -C $$dir $@; \
done
.PHONY: all user install force clean install_user install_udev_rules install_systemd \
install_programs install_initrd install_initrd_redhat install_initrd_debian \
install_doc install_iname install_libopeniscsiusr install_etc install_ec_all