Debian Codegraph @

Makefile

raw ◀ ▶
1 Debian patch touch this file
1 # Makefile
2
3 # You can edit this file or override these variables on
4 # the commandline. For example, "make install MANDIR=/tmp/man"
5 # would use defaults for all variables except ${MANDIR}.
6
7
8 # You can set this to something like /opt/aoetools-x
9 # if you want to install everything in one place.
10 #
11 # Note that even with ${PREFIX} set, the devices in
12 # /dev/etherd will be used unless you override ${DEVDIR}.
13 PREFIX =
14
15 # Your aoe-driver device files should be in ${DEVDIR}.
16 DEVDIR = /dev/etherd
17
18 # The programs will be installed in ${SBINDIR}.
19 SBINDIR = ${PREFIX}/usr/sbin
20 MANDIR = ${PREFIX}/usr/share/man
21
22 # NPERSHELF is the number of slot addresses per shelf address.
23 # This number must match the same setting in the aoe driver.
24 #
25 # Older aoe drivers have NPERSHELF set to 10, and newer ones
26 # use 16.
27 #
28 # You can see the setting in your driver like this in the driver
29 # source directory. (Change into the "linux" directory if you're
30 # using the standalone driver from CORAID.)
31 #
32 # grep 'NPERSHELF.*=' drivers/block/aoe/aoe.h
33 #
34 NPERSHELF=16
35
36 # end of user-configurable variables
37
38
39 # these scripts are created from the *.in files
40 CONF_SCRIPTS = aoe-discover aoe-interfaces aoe-mkshelf aoe-revalidate aoe-flush aoe-stat
41 PROGS = aoeping aoecfg aoe-sancheck
42 COMMANDS := ${CONF_SCRIPTS} aoe-mkdevs aoe-version coraid-update ${PROGS}
•43 CFLAGS += -Wall -O -g ${CPPFLAGS}
44 SANCHECKLIBS = -lpthread
45
46 AOE_PING_OBJ = aoeping.o linux.o
47 AOE_CFG_OBJ = aoecfg.o linux.o
48 SANCHECK_OBJ = aoe-sancheck.o
49
50 all : configure ${PROGS}
51 @true
52
53 configure :
54 @for f in ${CONF_SCRIPTS}; do \
55 sh -xc "sed -e 's!@devdir@!${DEVDIR}!g' -e 's!@npershelf@!${NPERSHELF}!g' $$f.in > $$f" || break; \
56 done
57
58 # DESTDIR was put in for Rob Holland to make gentoo packaging easier
59 install : all
60 mkdir -p ${DESTDIR}${SBINDIR}
61 mkdir -p ${DESTDIR}${MANDIR}/man8
62 @for f in ${COMMANDS}; do \
63 sh -xc "install -m 700 $$f ${DESTDIR}${SBINDIR}/$$f" || break; \
64 sh -xc "install -m 664 $$f.8 ${DESTDIR}${MANDIR}/man8/$$f.8" || break; \
65 done
66
67 clean :
68 rm -f ${CONF_SCRIPTS} ${AOE_PING_OBJ} ${AOE_CFG_OBJ} ${SANCHECK_OBJ} ${PROGS}
69
70 aoeping : ${AOE_PING_OBJ}
•71 ${CC} ${CFLAGS} ${LDFLAGS} -o $@ ${AOE_PING_OBJ}
72 aoeping.o : aoeping.c dat.h fns.h
73 ${CC} ${CFLAGS} -o $@ -c $<
74 linux.o : linux.c config.h
75 ${CC} ${CFLAGS} -o $@ -c $<
76 aoecfg: ${AOE_CFG_OBJ}
•77 ${CC} ${CFLAGS} ${LDFLAGS} -o $@ ${AOE_CFG_OBJ}
78 aoecfg.o : aoecfg.c dat.h fns.h
79 ${CC} ${CFLAGS} -o $@ -c $<
80 aoe-sancheck : ${SANCHECK_OBJ}
•81 -$(CC) $(CFLAGS) ${LDFLAGS} -o $@ ${SANCHECK_OBJ} $(SANCHECKLIBS)
82 aoe-sancheck.o : aoe-sancheck.c
83 -$(CC) $(CFLAGS) -o $@ -c $<
84