This repository was archived by the owner on Jun 3, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
66 lines (53 loc) · 2.12 KB
/
Makefile
File metadata and controls
66 lines (53 loc) · 2.12 KB
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
# Copyright 2015 by Clemson University
#
# This file is part of snmpiostat.
#
# Snmpiostat is free software: you can redistribute it and/or modify
# it under the terms of the Lesser GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# snmpiostat is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# Lesser GNU General Public License for more details.
#
# You should have received a copy of the Lesser GNU General Public License
# along with snmpiostat. If not, see <http://www.gnu.org/licenses/>.
host_os = @host_os@
prefix = /usr/local
exec_prefix = ${prefix}
datarootdir = ${prefix}/share
CC = gcc
INSTALLDIRS = ${exec_prefix}/bin ${exec_prefix}/sbin ${prefix}/etc ${datarootdir}/man/man1 ${datarootdir}/man/man8
CPPFLAGS =
CFLAGS = -g -O2 -DCONFFILE=\"${prefix}/etc/snmpiostat.conf\" -DVERSION=\"1.0.0\"
LDFLAGS =
LIBS = -lnetsnmp
INSTALL = install
all: snmpiostatagent snmpiostat
snmpiostatagent: snmpiostatagent.o conf.o
cc $(LDFLAGS) -o $@ snmpiostatagent.o conf.o $(LIBS)
snmpiostat: snmpiostat.o conf.o
cc $(LDFLAGS) -o $@ snmpiostat.o conf.o $(LIBS)
conf.o: conf.h Makefile
snmpiostat.o: conf.h config.h Makefile
snmpiostatagent.o: conf.h config.h Makefile
install-agent: snmpiostatagent install-dirs install-conf
$(INSTALL) -m 755 snmpiostatagent ${exec_prefix}/sbin/snmpiostatagent
$(INSTALL) -m 644 snmpiostatagent.8 ${datarootdir}/man/man8/snmpiostatagent.8
install-client: snmpiostat install-dirs install-conf
$(INSTALL) -m 755 snmpiostat ${exec_prefix}/bin/snmpiostat
$(INSTALL) -m 644 snmpiostat.1 ${datarootdir}/man/man1/snmpiostat.1
install-conf:
$(INSTALL) -m 644 snmpiostat.conf ${prefix}/etc/snmpiostat.conf
install-dirs:
for d in $(INSTALLDIRS) ; do \
if [ ! -d $$d ]; then \
mkdir -p -m 755 $$d ; \
fi \
done
clean:
rm -f snmpiostatagent snmpiostat *.o *~ core
distclean: clean
rm -f config.cache config.status config.log config.h Makefile