Revert "Revert "and added files""
[bcm963xx.git] / userapps / opensource / net-snmp / agent / Makefile.in
1 #
2 # Makefile for snmpd
3 #
4
5 top_builddir    = ..
6
7 #
8 # what to install
9 #
10 SUBDIRS=helpers mibgroup
11
12 INSTALLSBINPROGS= snmpd$(EXEEXT)
13 INSTALLLIBS     = libnetsnmpagent.$(LIB_EXTENSION)$(LIB_VERSION) \
14                 libnetsnmpmibs.$(LIB_EXTENSION)$(LIB_VERSION)
15
16 INCLUDESUBDIR=agent
17 INCLUDESUBDIRHEADERS=agent_read_config.h \
18         agent_registry.h \
19         agent_index.h \
20         agent_trap.h \
21         auto_nlist.h \
22         ds_agent.h \
23         snmp_agent.h \
24         snmp_vars.h \
25         var_struct.h \
26         agent_handler.h \
27         net-snmp-agent-includes.h \
28         agent_callbacks.h
29
30 INSTALLBUILTSUBDIRHEADERS=../include/net-snmp/agent/mib_module_config.h \
31                         mibgroup/mib_module_includes.h
32 INSTALLBUILTSUBDIR=agent
33
34 OTHERINSTALL=@EMBEDPERLINSTALL@
35
36 # XXX: need to install these  They're really UCD specific, however.
37 BROKEINSTALL= \
38         mib_modules.h \
39         mibgroup/struct.h \
40         mibgroup/util_funcs.h \
41         mibgroup/mibincl.h \
42         mibgroup/header_complex.h
43
44 INSTALLUCDHEADERS= \
45         agent_index.h   \
46         agent_read_config.h \
47         agent_registry.h \
48         agent_trap.h    \
49         auto_nlist.h    \
50         ds_agent.h      \
51         header_complex.h \
52         mibincl.h       \
53         snmp_agent.h    \
54         ucd-snmp-includes.h     \
55         ucd-snmp-agent-includes.h \
56         util_funcs.h    \
57         var_struct.h
58
59 #
60 # how to build it info
61 #
62 USELIBS         = ../snmplib/libnetsnmp.$(LIB_EXTENSION)$(LIB_VERSION)
63 HELPERLIB       = helpers/libnetsnmphelpers.$(LIB_EXTENSION)$(LIB_VERSION)
64 LOCAL_LIBS      = 
65 LIBS            = ../snmplib/libnetsnmp.$(LIB_EXTENSION)$(LIB_VERSION) @AGENTLIBS@
66 WRAPLIBS        = @WRAPLIBS@
67 OUR_AGENT_LIBS  = $(INSTALLLIBS) $(HELPERLIB) $(WRAPLIBS) $(LIBS) @DLLIBS@
68 CPPFLAGS        = -I../include -I$(top_srcdir)/include \
69                   -I.. -I$(srcdir)/.. -I$(srcdir)/../snmplib \
70                   -I$(srcdir) -I. -I$(srcdir)/mibgroup -Imibgroup @CPPFLAGS@
71
72 #
73 # Objects
74 #
75
76 # libnetsnmpmib objects.
77 LMIBOBJS        = @mibgroup_list_lo@ mib_modules.lo auto_nlist.lo
78 MIBOBJS         = @mibgroup_list_o@ mib_modules.o auto_nlist.o
79
80 # libnetsnmpagent objects
81 LIBAGENTOBJS=snmp_agent.o snmp_vars.o agent_read_config.o agent_registry.o \
82         agent_index.o agent_trap.o kernel.o  agent_handler.o \
83         object_monitor.o @OTHERAGENTLIBOBJS@
84 LLIBAGENTOBJS=snmp_agent.lo snmp_vars.lo agent_read_config.lo agent_registry.lo\
85         agent_index.lo agent_trap.lo kernel.lo agent_handler.lo \
86         object_monitor.lo @OTHERAGENTLIBLOBJS@
87
88 # The agent objects.
89 AGENTOBJS=snmpd.o
90 LAGENTOBJS=snmpd.lo
91
92 #
93 # Define OBJS and LOBJS for clean target (just this directory)
94 #
95 OBJS            = $(LIBAGENTOBJS)  $(AGENTOBJS)  mib_modules.o  auto_nlist.o
96 LOBJS           = $(LLIBAGENTOBJS) $(LAGENTOBJS) mib_modules.lo auto_nlist.lo
97
98
99 all: standardall
100
101 #
102 # build stuff targets
103 #
104 getkstat: getkstat.o
105         $(CC) $(CFLAGS) -o $@ $? $(LOCAL_LIBS) $(LIBS)
106
107 getkstat.o: mibgroup/kernel_sunos5.c
108         $(CC) $(CFLAGS) -o $@ -D_GETKSTAT_TEST -DDODEBUG -c $? 
109
110 getmibstat: getmibstat.o
111         $(CC) $(CFLAGS) -o $@ $? $(LOCAL_LIBS) $(LIBS)
112
113 getmibstat.o: mibgroup/kernel_sunos5.c
114         $(CC) $(CFLAGS) -o $@ -D_GETMIBSTAT_TEST -DDODEBUG -c $? 
115
116 snmpd$(EXEEXT): ${LAGENTOBJS} $(USELIBS) $(HELPERLIB) $(LIBTARG) ${INSTALLLIBS}
117         $(LINK) $(CFLAGS) -o $@ ${LAGENTOBJS} $(LOCAL_LIBS) ${LDFLAGS} ${OUR_AGENT_LIBS}
118
119
120 libnetsnmpagent.$(LIB_EXTENSION)$(LIB_VERSION):    ${LLIBAGENTOBJS} libnetsnmpmibs.$(LIB_EXTENSION)$(LIB_VERSION)
121         $(LIB_LD_CMD) libnetsnmpagent.$(LIB_EXTENSION)$(LIB_VERSION) ${LLIBAGENTOBJS}  $(LIB_LD_LIBS)
122         $(RANLIB) libnetsnmpagent.$(LIB_EXTENSION)$(LIB_VERSION)
123
124 libnetsnmpmibs.$(LIB_EXTENSION)$(LIB_VERSION):    ${LMIBOBJS}
125         $(LIB_LD_CMD) libnetsnmpmibs.$(LIB_EXTENSION)$(LIB_VERSION) ${LMIBOBJS}  $(LIB_LD_LIBS)
126         $(RANLIB) libnetsnmpmibs.$(LIB_EXTENSION)$(LIB_VERSION)
127
128 embedperlinstall:
129           @$(SHELL) $(srcdir)/../mkinstalldirs $(snmplibdir)
130           @$(INSTALL) $(srcdir)/snmp_perl.pl $(snmplibdir)/snmp_perl.pl
131           @echo "install:  installed $$i in $(snmplibdir)"
132
133 snmp_vars.lo: @module_list_h@
134 read_config.lo: @module_list_h@
135 mib_modules.lo: mibgroup/mib_module_inits.h