-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile.in
91 lines (70 loc) · 2.31 KB
/
Makefile.in
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
srcdir = @srcdir@
prefix = @prefix@
libdir = @libdir@
exec_prefix = @exec_prefix@
datadir = @datadir@
bindir = @bindir@
mandir = @mandir@
etcdir = @sysconfdir@
includedir = @includedir@
SHELL = /bin/sh
CC = @CC@
RM = rm -f
INSTALL = @INSTALL@
RANLIB = @RANLIB@
CFLAGS = -I. @CFLAGS@ @DEFS@ @CPPFLAGS@
LDFLAGS = @LDFLAGS@
LIBS = @LIBS@
LIBSRCS = drivers.c data.c @SNMPSRC@
SRCS = ifstat.c $(LIBSRCS)
OBJS = ${SRCS:.c=.o}
LIBOBJS = ${LIBSRCS:.c=.o}
TARGET = ifstat
LIBTARGET = libifstat.a
TARGETS = $(TARGET) @LIBTARGET@
.SUFFIXES: .c .o
.c.o:
$(CC) $(CFLAGS) -c $< -o $@
all: $(TARGETS) Makefile
$(TARGET): $(OBJS)
$(CC) $(OBJS) $(LDFLAGS) $(LIBS) -o $(TARGET)
$(LIBTARGET): $(LIBOBJS)
ar rv $(LIBTARGET) $(LIBOBJS)
$(RANLIB) $(LIBTARGET)
clean:
$(RM) *.o *~ .*~ core \#*\# gmon.out *.bak $(TARGETS)
distclean: clean
$(RM) config.h config.cache config.log config.status Makefile libifstat-config
maintainer-clean: distclean
$(RM) configure config.h.in ifstat.1
${srcdir}/configure: configure.in
cd ${srcdir} && autoconf
${srcdir}/config.h.in: configure.in acconfig.h
cd ${srcdir} && autoheader
Makefile: Makefile.in config.status
CONFIG_FILES=Makefile CONFIG_HEADERS= ./config.status
config.status: configure
./config.status --recheck
libifstat-config: libifstat-config.in
CONFIG_FILES=libifstat-config CONFIG_HEADERS= ./config.status
install: install-$(TARGET) install-@LIBTARGET@
install-$(TARGET): $(TARGET)
$(INSTALL) -d -m 755 $(bindir)
$(INSTALL) -m 755 $(TARGET) $(bindir)/$(TARGET)
$(INSTALL) -d -m 755 $(mandir)/man1
$(INSTALL) -m 644 ifstat.1 $(mandir)/man1/ifstat.1
install-$(LIBTARGET): $(LIBTARGET) libifstat-config
$(INSTALL) -d -m 755 $(bindir)
$(INSTALL) -m 755 libifstat-config $(bindir)/libifstat-config
$(INSTALL) -d -m 755 $(includedir)
$(INSTALL) -m 644 ifstat.h $(includedir)/ifstat.h
$(INSTALL) -d -m 755 $(libdir)
$(INSTALL) -m 644 $(LIBTARGET) $(libdir)/$(LIBTARGET)
$(INSTALL) -d -m 755 $(mandir)/man1
$(INSTALL) -m 644 libifstat-config.1 $(mandir)/man1/libifstat-config.1
install-: # dependency when not building library
realclean: maintainer-clean
# deps
ifstat.o: ifstat.c ifstat.h config.h
drivers.o: drivers.c ifstat.h config.h snmp.h
snmp.o: snmp.c ifstat.h config.h snmp.h