Hi  Wes,
 
Thanks so very much for your response and it works well!
 
The Makefile generated is to produce a file that can be run as a daemon, the snmpd.
My question now is how to make modifications to the Makefile to produce an object library,
like an *.o file so that it will be linked to the project?
 
What I tried was to:
1.     comment out the line
 

snmpd$(EXEEXT):        ${LAGENTOBJS} $(USELIBS) $(HELPERLIB) (LIBTARG) ${INSTALLLIBS}

       $(LINK) $(CFLAGS) -o $@ ${LAGENTOBJS} $(LOCAL_LIBS) ${LDFLAGS} ${OUR_AGENT_LIBS}

 
2.    to add the following line:
 

netsnmp.o:      ${LAGENTOBJS} $(USELIBS) $(LIBTARG) Makefile

        $(LINK) $(CFLAGS) -o $@ ${AGENTOBJS} ${LIBAGENTOBJS} ${MIBOBJS} ../snmplib/.lib/libnetsnmp.a

The netsnmp.o is what we want for the snmp agent support in the project.

But the result was that the *,o files under objdir/agent were not generated, they are:

agent_index.o agent_read_config.o agent_registry.o agent_trap.o atuo_nlist.o kernel.o mib_modules.o snmp_agent.o snmp_vars.o

only snmpd.o was there.

Why and how can I fix it?

Thanks again and in advance,

Shufen 

 



Wes Hardaker <[EMAIL PROTECTED]> wrote:
>>>>> On Mon, 6 Jun 2005 19:06:56 -0700 (PDT), Shufen Zhang <[EMAIL PROTECTED]>said:

Shufen> My question is that in the current ucd-snmp compiling, a
Shufen> directory objdir was created under the root snmp directory and
Shufen> all the object files went to here. How can I do the same thing
Shufen> for the new net-snmp agent too? How was it controlled? Is it
Shufen> controlled by ./configure option or controlled by the project
Shufen> makefile.

You should be able to:

mkdir obj_dir
cd obj_dir
../configure
make
make install

and all the objects will end up in the obj_dir directory rather than
with the source.

--
Wes Hardaker
Sparta, Inc.

__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the b est spam protection around
http://mail.yahoo.com

Reply via email to