makefile文件如下:
srcdir = .
top_srcdir = ..
pkgdatadir = $(datadir)/ipgrab
pkglibdir = $(libdir)/ipgrab
pkgincludedir = $(includedir)/ipgrab
top_builddir = ..
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
INSTALL = /usr/bin/install -c
install_sh_DATA = $(install_sh) -c -m 644
install_sh_PROGRAM = $(install_sh) -c
install_sh_SCRIPT = $(install_sh) -c
INSTALL_HEADER = $(INSTALL_DATA)
transform = $(program_transform_name)
NORMAL_INSTALL = :
PRE_INSTALL = :
POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
bin_PROGRAMS = ipgrab$(EXEEXT)
subdir = src
DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \
$(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
CONFIG_HEADER = $(top_builddir)/config.h
CONFIG_CLEAN_FILES =
am__installdirs = "$(DESTDIR)$(bindir)"
binPROGRAMS_INSTALL = $(INSTALL_PROGRAM)
PROGRAMS = $(bin_PROGRAMS)
am_ipgrab_OBJECTS = ah.$(OBJEXT) arp.$(OBJEXT) cbcp.$(OBJEXT) \
ccp.$(OBJEXT) chap.$(OBJEXT) datalink.$(OBJEXT) dhcp.$(OBJEXT) \
display.$(OBJEXT) dns.$(OBJEXT) dynports.$(OBJEXT) \
error.$(OBJEXT) esp.$(OBJEXT) ethernet.$(OBJEXT) \
ethertypes.$(OBJEXT) file.$(OBJEXT) ftpctrl.$(OBJEXT) \
getopt.$(OBJEXT) gre.$(OBJEXT) hexbuffer.$(OBJEXT) \
http.$(OBJEXT) iana.$(OBJEXT) icmp.$(OBJEXT) icmpv6.$(OBJEXT) \
igmp.$(OBJEXT) ip.$(OBJEXT) ip_protocols.$(OBJEXT) \
ip_services.$(OBJEXT) ipcp.$(OBJEXT) ipgrab.$(OBJEXT) \
ipv6.$(OBJEXT) ipx.$(OBJEXT) ipxrip.$(OBJEXT) isakmp.$(OBJEXT) \
l2tp.$(OBJEXT) layers.$(OBJEXT) lcp.$(OBJEXT) llc.$(OBJEXT) \
loopback.$(OBJEXT) mgcp.$(OBJEXT) mobileip.$(OBJEXT) \
mppc.$(OBJEXT) netbios_ns.$(OBJEXT) nntp.$(OBJEXT) \
ns_labels.$(OBJEXT) open_pcap.$(OBJEXT) ospf.$(OBJEXT) \
packet_manip.$(OBJEXT) padding.$(OBJEXT) parse_cl.$(OBJEXT) \
payload.$(OBJEXT) ppp.$(OBJEXT) pppoe.$(OBJEXT) pptp.$(OBJEXT) \
radius.$(OBJEXT) radius_3gpp2.$(OBJEXT) raw.$(OBJEXT) \
rip.$(OBJEXT) ripng.$(OBJEXT) rsvp.$(OBJEXT) rtcp.$(OBJEXT) \
rtp.$(OBJEXT) sdp.$(OBJEXT) sip.$(OBJEXT) slip.$(OBJEXT) \
slp.$(OBJEXT) snmp.$(OBJEXT) spx.$(OBJEXT) ssh.$(OBJEXT) \
state.$(OBJEXT) stats.$(OBJEXT) strmap.$(OBJEXT) tcp.$(OBJEXT) \
tftp.$(OBJEXT) udp.$(OBJEXT) utilities.$(OBJEXT)
ipgrab_OBJECTS = $(am_ipgrab_OBJECTS)
ipgrab_DEPENDENCIES =
DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)
depcomp = $(SHELL) $(top_srcdir)/depcomp
am__depfiles_maybe = depfiles
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
CCLD = $(CC)
LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
SOURCES = $(ipgrab_SOURCES)
DIST_SOURCES = $(ipgrab_SOURCES)
ETAGS = etags
CTAGS = ctags
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = ${SHELL} /home/IPgrab/ipgrab-0.9.10/missing --run aclocal-1.9
AMDEP_FALSE = #
AMDEP_TRUE =
AMTAR = ${SHELL} /home/IPgrab/ipgrab-0.9.10/missing --run tar
AUTOCONF = ${SHELL} /home/IPgrab/ipgrab-0.9.10/missing --run autoconf
AUTOHEADER = ${SHELL} /home/IPgrab/ipgrab-0.9.10/missing --run autoheader
AUTOMAKE = ${SHELL} /home/IPgrab/ipgrab-0.9.10/missing --run automake-1.9
AWK = gawk
CC = gcc
CCDEPMODE = depmode=gcc3
CFLAGS = -g #-O2
CPP = gcc -E
CPPFLAGS =
CYGPATH_W = #echo
DEFS = -DHAVE_CONFIG_H
DEPDIR = .deps
ECHO_C =
ECHO_N = -n
ECHO_T =
EGREP = /bin/grep -E
EXEEXT =
GREP = /bin/grep
INSTALL_DATA = ${INSTALL} -m 644
INSTALL_PROGRAM = ${INSTALL}
INSTALL_SCRIPT = ${INSTALL}
INSTALL_STRIP_PROGRAM = ${SHELL} $(install_sh) -c -s
LDFLAGS =
LIBOBJS =
LIBS =
LTLIBOBJS =
MAKEINFO = ${SHELL} /home/IPgrab/ipgrab-0.9.10/missing --run makeinfo
OBJEXT = o
PACKAGE = ipgrab
PACKAGE_BUGREPORT = mike@borella.net
PACKAGE_NAME = ipgrab
PACKAGE_STRING = ipgrab 0.9.10
PACKAGE_TARNAME = ipgrab
PACKAGE_VERSION = 0.9.10
PATH_SEPARATOR = :
SET_MAKE =
SHELL = /bin/sh
STRIP =
VERSION = 0.9.10
ac_ct_CC = gcc
am__fastdepCC_FALSE = #
am__fastdepCC_TRUE =
am__include = include
am__leading_dot = .
am__quote =
am__tar = ${AMTAR} chof - "$$tardir"
am__untar = ${AMTAR} xf -
bindir = ${exec_prefix}/bin
build_alias =
datadir = ${datarootdir}
datarootdir = ${prefix}/share
docdir = ${datarootdir}/doc/${PACKAGE_TARNAME}
dvidir = ${docdir}
exec_prefix = ${prefix}
host_alias =
htmldir = ${docdir}
includedir = ${prefix}/include
infodir = ${datarootdir}/info
install_sh = /home/IPgrab/ipgrab-0.9.10/install-sh
libdir = ${exec_prefix}/lib
libexecdir = ${exec_prefix}/libexec
localedir = ${datarootdir}/locale
localstatedir = ${prefix}/var
mandir = ${datarootdir}/man
mkdir_p = mkdir -p --
oldincludedir = /usr/include
pdfdir = ${docdir}
prefix = /home/IPgrab/ipgrab-0.9.10
program_transform_name = s,x,x,
psdir = ${docdir}
sbindir = ${exec_prefix}/sbin
sharedstatedir = ${prefix}/com
sysconfdir = ${prefix}/etc
target_alias =
AM_CFLAGS = -Wall -Wstrict-prototypes -Wformat
INCLUDES = -I/usr/local/include
ipgrab_SOURCES = ah.h ah.c arp.h arp.c cbcp.h cbcp.c ccp.h ccp.c \
chap.h chap.c datalink.h datalink.c dhcp.h dhcp.c display.h \
display.c dns.h dns.c dynports.h dynports.c error.h error.c \
esp.h esp.c ethernet.h ethernet.c ethertypes.h ethertypes.c \
file.h file.c ftpctrl.h ftpctrl.c getopt.h getopt.c global.h \
gre.h gre.c hexbuffer.h hexbuffer.c http.h http.c iana.h \
iana.c icmp.h icmp.c icmpv6.h icmpv6.c igmp.h igmp.c ip.h ip.c \
ip_protocols.h ip_protocols.c ip_services.h ip_services.c \
ipcp.h ipcp.c ipgrab.h ipgrab.c ipv6.h ipv6.c ipx.h ipx.c \
ipxrip.h ipxrip.c isakmp.h isakmp.c l2tp.h l2tp.c layers.h \
layers.c lcp.h lcp.c llc.h llc.c local.h loopback.h loopback.c \
mgcp.h mgcp.c mobileip.h mobileip.c mppc.h mppc.c netbios_ns.h \
netbios_ns.c nntp.h nntp.c ns_labels.h ns_labels.c open_pcap.h \
open_pcap.c ospf.h ospf.c packet_manip.h packet_manip.c \
padding.h padding.c parse_cl.h parse_cl.c payload.h payload.c \
ppp.h ppp.c pppoe.h pppoe.c pptp.h pptp.c radius.h radius.c \
radius_3gpp2.h radius_3gpp2.c raw.h raw.c rip.h rip.c ripng.h \
ripng.c rsvp.h rsvp.c rtcp.h rtcp.c rtp.h rtp.c sdp.h sdp.c \
sip.h sip.c slip.h slip.c slp.h slp.c ipgsnmp.h snmp.c spx.h \
spx.c ssh.h ssh.c state.h state.c stats.h stats.c strmap.h \
strmap.c tcp.h tcp.c tftp.h tftp.c udp.h udp.c utilities.h \
utilities.c
ipgrab_LDADD = -L/usr/local/lib -lpcap
CLEANFILES = *~
all: all-am
.SUFFIXES:
.SUFFIXES: .c .o .obj
$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
@for dep in $?; do \
case '$(am__configure_deps)' in \
*$$dep*) \
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
&& exit 0; \
exit 1;; \
esac; \
done; \
echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/Makefile'; \
cd $(top_srcdir) && \
$(AUTOMAKE) --gnu src/Makefile
.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \
*config.status*) \
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
*) \
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
esac;
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(top_srcdir)/configure: $(am__configure_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(ACLOCAL_M4): $(am__aclocal_m4_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
install-binPROGRAMS: $(bin_PROGRAMS)
@$(NORMAL_INSTALL)
test -z "$(bindir)" || $(mkdir_p) "$(DESTDIR)$(bindir)"
@list='$(bin_PROGRAMS)'; for p in $$list; do \
p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
if test -f $$p \
; then \
f=`echo "$$p1" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \
echo " $(INSTALL_PROGRAM_ENV) $(binPROGRAMS_INSTALL) '$$p' '$(DESTDIR)$(bindir)/$$f'"; \
$(INSTALL_PROGRAM_ENV) $(binPROGRAMS_INSTALL) "$$p" "$(DESTDIR)$(bindir)/$$f" || exit 1; \
else :; fi; \
done
uninstall-binPROGRAMS:
@$(NORMAL_UNINSTALL)
@list='$(bin_PROGRAMS)'; for p in $$list; do \
f=`echo "$$p" | sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \
echo " rm -f '$(DESTDIR)$(bindir)/$$f'"; \
rm -f "$(DESTDIR)$(bindir)/$$f"; \
done
clean-binPROGRAMS:
-test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS)
ipgrab$(EXEEXT): $(ipgrab_OBJECTS) $(ipgrab_DEPENDENCIES)
@rm -f ipgrab$(EXEEXT)
$(LINK) $(ipgrab_LDFLAGS) $(ipgrab_OBJECTS) $(ipgrab_LDADD) $(LIBS)
mostlyclean-compile:
-rm -f *.$(OBJEXT)
distclean-compile:
-rm -f *.tab.c
include ./$(DEPDIR)/ah.Po
include ./$(DEPDIR)/arp.Po
include ./$(DEPDIR)/cbcp.Po
include ./$(DEPDIR)/ccp.Po
include ./$(DEPDIR)/chap.Po
include ./$(DEPDIR)/datalink.Po
include ./$(DEPDIR)/dhcp.Po
include ./$(DEPDIR)/display.Po
include ./$(DEPDIR)/dns.Po
include ./$(DEPDIR)/dynports.Po
include ./$(DEPDIR)/error.Po
include ./$(DEPDIR)/esp.Po
include ./$(DEPDIR)/ethernet.Po
include ./$(DEPDIR)/ethertypes.Po
include ./$(DEPDIR)/file.Po
include ./$(DEPDIR)/ftpctrl.Po
include ./$(DEPDIR)/getopt.Po
include ./$(DEPDIR)/gre.Po
include ./$(DEPDIR)/hexbuffer.Po
include ./$(DEPDIR)/http.Po
include ./$(DEPDIR)/iana.Po
include ./$(DEPDIR)/icmp.Po
include ./$(DEPDIR)/icmpv6.Po
include ./$(DEPDIR)/igmp.Po
include ./$(DEPDIR)/ip.Po
include ./$(DEPDIR)/ip_protocols.Po
include ./$(DEPDIR)/ip_services.Po
include ./$(DEPDIR)/ipcp.Po
include ./$(DEPDIR)/ipgrab.Po
include ./$(DEPDIR)/ipv6.Po
include ./$(DEPDIR)/ipx.Po
include ./$(DEPDIR)/ipxrip.Po
include ./$(DEPDIR)/isakmp.Po
include ./$(DEPDIR)/l2tp.Po
include ./$(DEPDIR)/layers.Po
include ./$(DEPDIR)/lcp.Po
include ./$(DEPDIR)/llc.Po
include ./$(DEPDIR)/loopback.Po
include ./$(DEPDIR)/mgcp.Po
include ./$(DEPDIR)/mobileip.Po
include ./$(DEPDIR)/mppc.Po
include ./$(DEPDIR)/netbios_ns.Po
3 个解决方案
#1
在ipgrab_SOURCE和Sam_ipgrab_OBJECTS后面增加新文件的名字,其他不变。
#2
谢谢楼上,问题的解决如您所说!
#3
ipgrab_SOURCES 加上增加的.c
#1
在ipgrab_SOURCE和Sam_ipgrab_OBJECTS后面增加新文件的名字,其他不变。
#2
谢谢楼上,问题的解决如您所说!
#3
ipgrab_SOURCES 加上增加的.c