File: Makefile.in

package info (click to toggle)
net-snmp 5.2.3-7etch4
  • links: PTS
  • area: main
  • in suites: etch
  • size: 24,452 kB
  • ctags: 16,045
  • sloc: ansic: 175,930; perl: 11,814; sh: 11,230; makefile: 5,375; pascal: 62
file content (171 lines) | stat: -rw-r--r-- 5,219 bytes parent folder | download | duplicates (2)
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
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
#
# Makefile for snmpd
#

top_builddir	= ..

# use GNU vpath, if available, to only set a path for source and headers
# VPATH will pick up objects too, which is bad if you are sharing a
# source dir...
@GNU_vpath@ %.h $(srcdir)
@GNU_vpath@ %.c $(srcdir)
# fallback to regular VPATH for non-gnu...
@NON_GNU_VPATH@ $(srcdir)

#
# what to install
#
SUBDIRS=helpers mibgroup

INSTALLSBINPROGS= snmpd$(EXEEXT)
INSTALLLIBS	= libnetsnmpmibs.$(LIB_EXTENSION)$(LIB_VERSION) \
		  libnetsnmpagent.$(LIB_EXTENSION)$(LIB_VERSION)

INCLUDESUBDIR=agent
INCLUDESUBDIRHEADERS=agent_read_config.h \
	agent_registry.h \
	agent_index.h \
	agent_trap.h \
	auto_nlist.h \
	ds_agent.h \
	snmp_agent.h \
	snmp_vars.h \
	var_struct.h \
	agent_handler.h \
	net-snmp-agent-includes.h \
	mib_modules.h \
	agent_callbacks.h

INSTALLBUILTSUBDIRHEADERS=../include/net-snmp/agent/mib_module_config.h \
			  ../include/net-snmp/agent/agent_module_config.h \
			mibgroup/mib_module_includes.h
INSTALLBUILTSUBDIR=agent

INCLUDEMIBGROUPDIR=agent/mibgroup
INCLUDEMIBGROUPDIRHEADERS=util_funcs.h

OTHERINSTALL=installmibgroupheaders @EMBEDPERLINSTALL@
OTHERUNINSTALL=@EMBEDPERLUNINSTALL@

# XXX: need to install these  They're really UCD specific, however.
BROKEINSTALL= \
	mibgroup/struct.h \
	mibgroup/util_funcs.h \
	mibgroup/mibincl.h \
	mibgroup/ucd-snmp/dlmod.h \
	mibgroup/utilities/execute.h \
	mibgroup/header_complex.h

INSTALLUCDHEADERS= \
	agent_index.h	\
	agent_read_config.h \
	agent_registry.h \
	agent_trap.h	\
	auto_nlist.h	\
	ds_agent.h	\
	header_complex.h \
	mibincl.h	\
	snmp_agent.h	\
	ucd-snmp-includes.h	\
	ucd-snmp-agent-includes.h \
	util_funcs.h	\
	var_struct.h

#
# how to build it info
#
USELIBS		= ../snmplib/libnetsnmp.$(LIB_EXTENSION)$(LIB_VERSION)
HELPERLIB	= helpers/libnetsnmphelpers.$(LIB_EXTENSION)$(LIB_VERSION)
LOCAL_LIBS	= 
PERLLDOPTS      = @PERLLDOPTS@
LIBS		= ../snmplib/libnetsnmp.$(LIB_EXTENSION)$(LIB_VERSION) @AGENTLIBS@ $(PERLLDOPTS)
OUR_AGENT_LIBS	= $(INSTALLLIBS) $(HELPERLIB) @WRAPLIBS@ $(LIBS) @DLLIBS@
CPPFLAGS	= $(TOP_INCLUDES) -I. $(AGENT_INCLUDES) $(MIBGROUP_INCLUDES) \
		  $(SNMPLIB_INCLUDES) @CPPFLAGS@ 


#
# Objects
#

# libnetsnmpmib objects.
LMIBOBJS	= @mibgroup_list_lo@ mib_modules.lo auto_nlist.lo
MIBOBJS		= @mibgroup_list_o@ mib_modules.o auto_nlist.o

# libnetsnmpagent objects
LIBAGENTOBJS=snmp_agent.o snmp_vars.o agent_read_config.o \
	agent_registry.o agent_index.o agent_trap.o kernel.o \
	 agent_handler.o @agentgroup_list_o@ @OTHERAGENTLIBOBJS@
LLIBAGENTOBJS=snmp_agent.lo snmp_vars.lo agent_read_config.lo \
	agent_registry.lo agent_index.lo agent_trap.lo kernel.lo \
	agent_handler.lo @agentgroup_list_lo@ @OTHERAGENTLIBLOBJS@

# The agent objects.
AGENTOBJS=snmpd.o @other_agentobjs@
LAGENTOBJS=snmpd.lo @other_lagentobjs@

#
# Define OBJS and LOBJS for clean target (just this directory)
#
OBJS		= $(LIBAGENTOBJS)  $(AGENTOBJS)  mib_modules.o  auto_nlist.o
LOBJS		= $(LLIBAGENTOBJS) $(LAGENTOBJS) mib_modules.lo auto_nlist.lo


all: standardall

#
# build stuff targets
#
getkstat: getkstat.o
	$(CC) $(CFLAGS) -o $@ $? $(LOCAL_LIBS) $(LIBS)

getkstat.o: mibgroup/kernel_sunos5.c
	$(CC) $(CFLAGS) -o $@ -D_GETKSTAT_TEST -DDODEBUG -c $? 

getmibstat: getmibstat.o
	$(CC) $(CFLAGS) -o $@ $? $(LOCAL_LIBS) $(LIBS)

getmibstat.o: mibgroup/kernel_sunos5.c
	$(CC) $(CFLAGS) -o $@ -D_GETMIBSTAT_TEST -DDODEBUG -c $? 

snmpd$(EXEEXT):	${LAGENTOBJS} $(USELIBS) $(HELPERLIB) $(LIBTARG) ${INSTALLLIBS}
	$(LINK) $(CFLAGS) -o $@ ${LAGENTOBJS} $(LOCAL_LIBS) ${LDFLAGS} ${OUR_AGENT_LIBS}


libnetsnmpagent.$(LIB_EXTENSION)$(LIB_VERSION):    ${LLIBAGENTOBJS} libnetsnmpmibs.$(LIB_EXTENSION)$(LIB_VERSION)
	$(LIB_LD_CMD) libnetsnmpagent.$(LIB_EXTENSION)$(LIB_VERSION) ${LLIBAGENTOBJS}  $(LIB_LD_LIBS)
	$(RANLIB) libnetsnmpagent.$(LIB_EXTENSION)$(LIB_VERSION)

libnetsnmpmibs.$(LIB_EXTENSION)$(LIB_VERSION):    ${LMIBOBJS}
	$(LIB_LD_CMD) libnetsnmpmibs.$(LIB_EXTENSION)$(LIB_VERSION) ${LMIBOBJS}  $(LIB_LD_LIBS)
	$(RANLIB) libnetsnmpmibs.$(LIB_EXTENSION)$(LIB_VERSION)

agentlib: libnetsnmpagent.$(LIB_EXTENSION)$(LIB_VERSION)

miblib: libnetsnmpmibs.$(LIB_EXTENSION)$(LIB_VERSION)

libs: $(INSTALLLIBS)

embedperlinstall:
	  @$(SHELL) $(srcdir)/../mkinstalldirs $(INSTALL_PREFIX)$(snmplibdir)
	  @$(INSTALL) $(srcdir)/snmp_perl.pl $(INSTALL_PREFIX)$(snmplibdir)/snmp_perl.pl
	  @echo "install:  installed snmp_perl.pl in $(INSTALL_PREFIX)$(snmplibdir)"

embedperluninstall:
	  @rm -f $(INSTALL_PREFIX)$(snmplibdir)/snmp_perl.pl
	  @echo "removed snmp_perl.pl from $(INSTALL_PREFIX)$(snmplibdir)"

installmibgroupheaders:
	@if test "$(INCLUDEMIBGROUPDIRHEADERS)" != "" ; then \
                echo creating directory $(INSTALL_PREFIX)$(includedir)/agent ; \
                it="$(INCLUDEMIBGROUPDIRHEADERS)" ; \
                $(SHELL) $(top_srcdir)/mkinstalldirs $(INSTALL_PREFIX)$(includedir)/agent ; \
                for i in $$it ; do \
                        $(INSTALL_DATA) $(top_srcdir)/$(INCLUDEMIBGROUPDIR)/$$i $(INSTALL_PREFIX)$(includedir)/agent ; \
                        echo "installing $$i in $(INSTALL_PREFIX)$(includedir)/agent" ; \
                done \
        fi

snmp_vars.lo: @module_list_h@
read_config.lo: @module_list_h@
mib_modules.lo: mibgroup/mib_module_inits.h