Project

General

Profile

Bug #4190 ยป 011.Makefile.in.patch

Alexander Pyhalov, 2013-10-18 11:20 AM

View differences:

net-snmp-5.4.1.2/agent/helpers/Makefile.in 2013-10-17 15:01:45.986554507 +0400
137 137
	table_tdata.lo \
138 138
	watcher.lo
139 139

  
140
LIB_LD_ADD	=-lnetsnmp
141
LIB_LD_ADD_PATH	=-L../../snmplib
142

  
140 143
all: standardall
141 144

  
142 145
libnetsnmphelpers.$(LIB_EXTENSION)$(LIB_VERSION):    $(LOBJS)
143
	$(LIB_LD_CMD) $@ $(LOBJS) $(AGENTLIB) $(NETSNMPLIB) $(LDFLAGS) $(LIB_LD_LIBS)
144
	$(RANLIB) $@
146
	$(LIB_LD_CMD) $@ $(LIB_LD_ADD_PATH) $(LOBJS) $(AGENTLIB) $(NETSNMPLIB) $(LDFLAGS) $(LIB_LD_LIBS) $(LIB_LD_ADD) -fstack-protector
147
	$(RANLIB) $@ $(LIB_LD_ADD)
net-snmp-5.4.1.2/snmplib/Makefile.in 2013-10-17 13:54:55.055636301 +0400
181 181
# just in case someone wants to remove libtool, change this to OBJS.
182 182
TOBJS=$(LOBJS)
183 183

  
184
# To satisfy -zdefs
185
LIB_LD_ADD	=-lnsl -lsocket -L$(libdir)
186

  
184 187
# 
185 188
CPPFLAGS = $(TOP_INCLUDES) -I. 	$(SNMPLIB_INCLUDES) @CPPFLAGS@
186 189

  
......
188 191

  
189 192
# how to build the libraries.
190 193
libnetsnmp.$(LIB_EXTENSION)$(LIB_VERSION):    $(TOBJS)
191
	$(LIB_LD_CMD) $@ $(TOBJS) $(LDFLAGS) @LNETSNMPLIBS@
192
	$(RANLIB) $@
194
	$(LIB_LD_CMD) $@ $(TOBJS) $(LDFLAGS) @LNETSNMPLIBS@ $(LIB_LD_ADD) -fstack-protector
195
	$(RANLIB) $@  $(LIB_LD_ADD)
193 196

  
194 197
libsnmp.$(LIB_EXTENSION)$(LIB_VERSION):    $(TOBJS)
195
	$(LIB_LD_CMD) $@ $(TOBJS) $(LDFLAGS) @LNETSNMPLIBS@
198
	$(LIB_LD_CMD) $@ $(TOBJS) $(LDFLAGS) @LNETSNMPLIBS@ -fstack-protector
196 199
	$(RANLIB) $@
197 200

  
198 201
#
199
-- net-snmp-5.4.1.2/apps/snmpnetstat/Makefile.in.orig	2007-05-15 01:48:53.000000000 +0400
202
++ net-snmp-5.4.1.2/apps/snmpnetstat/Makefile.in	2013-10-17 15:13:48.500674401 +0400
......
29 29
all: standardall
30 30

  
31 31
snmpnetstat$(EXEEXT): ${LOBJS} ${USELIBS}
32
	${LINK} ${CFLAGS} -o $@ ${LOBJS} ${LOCAL_LIBS} ${LDFLAGS} ${LIBS}
32
	${LINK} ${CFLAGS} -o $@ ${LOBJS} ${LOCAL_LIBS} ${LDFLAGS} ${LIBS} -fstack-protector
33
-- net-snmp-5.4.1.2/apps/Makefile.in.~1~	2007-07-05 03:26:56.000000000 +0400
33
++ net-snmp-5.4.1.2/apps/Makefile.in	2013-10-17 15:36:48.258381815 +0400
......
84 84
OTHERINSTALL=snmpinforminstall snmptrapdperlinstall
85 85
OTHERUNINSTALL=snmpinformuninstall snmptrapdperluninstall
86 86

  
87
LDFLAGS 	+= -fstack-protector
88

  
87 89
#
88 90
# build rules
89 91
#
......
143 145
	$(LINK) ${CFLAGS} -o $@ snmpdf.$(OSUFFIX) $(LOCAL_LIBS) ${LDFLAGS} ${LIBS} 
144 146

  
145 147
libnetsnmptrapd.$(LIB_EXTENSION)$(LIB_VERSION): $(LLIBTRAPD_OBJS)
146
	$(LIB_LD_CMD) $@ ${LLIBTRAPD_OBJS} $(MIBLIB) $(USELIBS) $(PERLLDOPTS_FOR_LIBS) $(LIB_LD_LIBS)
148
	$(LIB_LD_CMD) $@ ${LLIBTRAPD_OBJS} $(MIBLIB) $(USELIBS) $(PERLLDOPTS_FOR_LIBS) $(LIB_LD_LIBS) -fstack-protector
147 149
	$(RANLIB) $@
148 150

  
149 151
snmpinforminstall:
150
-- net-snmp-5.4.1.2/agent/Makefile.in.~1~	2007-07-05 03:26:56.000000000 +0400
152
++ net-snmp-5.4.1.2/agent/Makefile.in	2013-10-17 22:00:35.034195847 +0400
......
120 120
OBJS		= $(LIBAGENTOBJS)  $(AGENTOBJS)  mib_modules.o  auto_nlist.o
121 121
LOBJS		= $(LLIBAGENTOBJS) $(LAGENTOBJS) mib_modules.lo auto_nlist.lo
122 122

  
123
LIB_LD_ADD_AGENT	=-lnetsnmp -lnetsnmphelpers
124
 
125
LIB_LD_ADD_PATH_MIBS	=-Lhelpers -L../snmplib
123 126

  
124
all: agentlib subdirs miblib $(INSTALLBINPROGS) $(INSTALLSBINPROGS)
127
all: agentlib subdirs miblib relinklib $(INSTALLBINPROGS) $(INSTALLSBINPROGS)
125 128

  
126 129
#
127 130
# build stuff targets
......
139 142
	$(CC) $(CFLAGS) -o $@ -D_GETMIBSTAT_TEST -DDODEBUG -c $? 
140 143

  
141 144
snmpd$(EXEEXT):	${LAGENTOBJS} $(USELIBS) $(AGENTLIB) $(HELPERLIB) $(MIBLIB) $(LIBTARG) 
142
	$(LINK) $(CFLAGS) -o $@ ${LAGENTOBJS} $(LOCAL_LIBS) ${LDFLAGS} ${OUR_AGENT_LIBS}
145
	$(LINK) $(CFLAGS) -o $@ ${LAGENTOBJS} $(LOCAL_LIBS) ${LDFLAGS} ${OUR_AGENT_LIBS} -fstack-protector
143 146

  
144 147

  
145 148
libnetsnmpagent.$(LIB_EXTENSION)$(LIB_VERSION):    ${LLIBAGENTOBJS} $(USELIBS)
146
	$(LIB_LD_CMD) $(AGENTLIB) ${LLIBAGENTOBJS} $(USELIBS) ${LAGENTLIBS} $(LDFLAGS) $(PERLLDOPTS_FOR_LIBS) $(LIB_LD_LIBS)
149
	$(LIB_LD_CMD) $(AGENTLIB) ${LLIBAGENTOBJS} $(USELIBS) ${LAGENTLIBS} $(LDFLAGS) $(PERLLDOPTS_FOR_LIBS) $(LIB_LD_LIBS) -fstack-protector
147 150
	$(RANLIB) $(AGENTLIB)
148 151

  
149 152
libnetsnmpmibs.$(LIB_EXTENSION)$(LIB_VERSION): ${LMIBOBJS} $(HELPERLIB) $(AGENTLIB) $(USELIBS)
150
	$(LIB_LD_CMD) $(MIBLIB) ${LMIBOBJS} $(HELPERLIB) $(AGENTLIB) $(USELIBS) ${LMIBLIBS} $(LDFLAGS) $(LIB_LD_LIBS)
153
	$(LIB_LD_CMD) $(MIBLIB) ${LMIBOBJS} $(HELPERLIB) $(AGENTLIB) $(USELIBS) ${LMIBLIBS} $(LDFLAGS) $(LIB_LD_LIBS) -fstack-protector
151 154
	$(RANLIB) $(MIBLIB)
152 155

  
153 156
agentlib: $(AGENTLIB)
154 157

  
158
relinklib:     ${LLIBAGENTOBJS} $(USELIBS)
159
	$(LIB_LD_CMD) $(AGENTLIB) $(LIB_LD_ADD_PATH_MIBS) ${LLIBAGENTOBJS} $(USELIBS) ${LAGENTLIBS} $(LDFLAGS) $(PERLLDOPTS_FOR_LIBS) $(LIB_LD_LIBS) $(LIB_LD_ADD_AGENT) -fstack-protector
160
	$(RANLIB) $(AGENTLIB) $(LIB_LD_ADD_AGENT)
161

  
155 162
miblib: $(MIBLIB)
156 163

  
157 164
libs: $(INSTALLLIBS)
    (1-1/1)