From 8725d37b4786fc60766361b3d62312f79f506e49 Mon Sep 17 00:00:00 2001 From: david Date: Sun, 14 Oct 2007 04:24:42 +0000 Subject: [PATCH] Avoid rebuilding nmap every time "make" is run. The target "all" takes care of building all prerequisites. One downside is that you can't do "make nmap" in an clean tree any more, if anyone ever did that. You have to do "make" once to build the prerequisites. This is how Automake does it. I'll keep thinking about this. --- Makefile.in | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Makefile.in b/Makefile.in index 7570864e1..30e0921f3 100644 --- a/Makefile.in +++ b/Makefile.in @@ -76,8 +76,10 @@ OBJS = main.o nmap.o targets.o tcpip.o nmap_error.o utils.o idle_scan.o osscan.o .cc.o: $(CXX) -c $(CPPFLAGS) $(CXXFLAGS) $< -o $@ -all: $(TARGET) $(TARGETNMAPFE) $(BUILDUMIT) -$(TARGET): @LUA_DEPENDS@ @PCAP_DEPENDS@ @PCRE_DEPENDS@ @DNET_DEPENDS@ $(NBASEDIR)/libnbase.a $(NSOCKDIR)/src/libnsock.a $(NSESTDLIB) $(OBJS) +all: @LUA_DEPENDS@ @PCAP_DEPENDS@ @PCRE_DEPENDS@ @DNET_DEPENDS@ $(NBASEDIR)/libnbase.a $(NSOCKDIR)/src/libnsock.a $(NSESTDLIB) + $(MAKE) $(TARGET) $(TARGETNMAPFE) $(BUILDUMIT) + +$(TARGET): $(OBJS) echo Compiling nmap rm -f $@ $(CXX) $(LDFLAGS) -o $@ $(OBJS) $(LIBS)