diff --git a/Makefile.in b/Makefile.in index 1885af7b38..889be7bcad 100644 --- a/Makefile.in +++ b/Makefile.in @@ -52,11 +52,17 @@ TARGETNMAPFE=@TARGETNMAPFE@ INSTALLNMAPFE=@INSTALLNMAPFE@ INSTALLNSE=@INSTALLNSE@ -export SRCS = main.cc nmap.cc targets.cc tcpip.cc nmap_error.cc utils.cc idle_scan.cc osscan.cc osscan2.cc output.cc scan_engine.cc timing.cc charpool.cc services.cc protocols.cc nmap_rpc.cc portlist.cc NmapOps.cc TargetGroup.cc Target.cc FingerPrintResults.cc service_scan.cc NmapOutputTable.cc MACLookup.cc nmap_tty.cc nmap_dns.cc nse_main.cc nse_auxiliar.cc nse_nsock.cc nse_init.cc nse_nmaplib.cc nse_debug.cc nse_bitlib.cc nse_pcrelib.cc nse_string.cc traceroute.cc reason.cc @COMPAT_SRCS@ +ifneq (@LIBLUA_LIBS@,) +NSE_SRC=nse_main.cc nse_auxiliar.cc nse_nsock.cc nse_init.cc nse_nmaplib.cc nse_debug.cc nse_bitlib.cc nse_pcrelib.cc nse_string.cc +NSE_HDRS=nse_main.h nse_auxiliar.h nse_nsock.h nse_init.h nse_nmaplib.h nse_debug.h nse_macros.h nse_bitlib.h nse_pcrelib.h nse_string.h +NSE_OBJS=nse_main.o nse_auxiliar.o nse_nsock.o nse_init.o nse_nmaplib.o nse_debug.o nse_bitlib.o nse_pcrelib.o nse_string.o +endif -export HDRS = charpool.h FingerPrintResults.h global_structures.h idle_scan.h MACLookup.h nmap_amigaos.h nmap_dns.h nmap_error.h nmap.h NmapOps.h NmapOutputTable.h nmap_rpc.h nmap_tty.h nmap_winconfig.h osscan.h osscan2.h output.h portlist.h protocols.h scan_engine.h service_scan.h services.h TargetGroup.h Target.h targets.h tcpip.h timing.h utils.h nse_main.h nse_auxiliar.h nse_nsock.h nse_init.h nse_nmaplib.h nse_debug.h nse_macros.h nse_bitlib.h nse_pcrelib.h nse_string.h traceroute.h reason.h +export SRCS = main.cc nmap.cc targets.cc tcpip.cc nmap_error.cc utils.cc idle_scan.cc osscan.cc osscan2.cc output.cc scan_engine.cc timing.cc charpool.cc services.cc protocols.cc nmap_rpc.cc portlist.cc NmapOps.cc TargetGroup.cc Target.cc FingerPrintResults.cc service_scan.cc NmapOutputTable.cc MACLookup.cc nmap_tty.cc nmap_dns.cc traceroute.cc reason.cc $(NSE_SRC) @COMPAT_SRCS@ -OBJS = main.o nmap.o targets.o tcpip.o nmap_error.o utils.o idle_scan.o osscan.o osscan2.o output.o scan_engine.o timing.o charpool.o services.o protocols.o nmap_rpc.o portlist.o NmapOps.o TargetGroup.o Target.o FingerPrintResults.o service_scan.o NmapOutputTable.o MACLookup.o nmap_tty.o nmap_dns.o nse_main.o nse_auxiliar.o nse_nsock.o nse_init.o nse_nmaplib.o nse_debug.o nse_bitlib.o nse_pcrelib.o nse_string.o traceroute.o reason.o @COMPAT_OBJS@ +export HDRS = charpool.h FingerPrintResults.h global_structures.h idle_scan.h MACLookup.h nmap_amigaos.h nmap_dns.h nmap_error.h nmap.h NmapOps.h NmapOutputTable.h nmap_rpc.h nmap_tty.h nmap_winconfig.h osscan.h osscan2.h output.h portlist.h protocols.h scan_engine.h service_scan.h services.h TargetGroup.h Target.h targets.h tcpip.h timing.h utils.h traceroute.h reason.h $(NSE_HDRS) + +OBJS = main.o nmap.o targets.o tcpip.o nmap_error.o utils.o idle_scan.o osscan.o osscan2.o output.o scan_engine.o timing.o charpool.o services.o protocols.o nmap_rpc.o portlist.o NmapOps.o TargetGroup.o Target.o FingerPrintResults.o service_scan.o NmapOutputTable.o MACLookup.o nmap_tty.o nmap_dns.o traceroute.o reason.o $(NSE_OBJS) @COMPAT_OBJS@ # %.o : %.cc -- nope this is a GNU extension .cc.o: @@ -95,6 +101,7 @@ $(LIBLUADIR)/liblua.a: $(LIBLUADIR)/Makefile FORCE #$(LIBPCAPDIR)/Makefile: # @echo Configuring libpcap; cd $(LIBPCAPDIR); ./configure + nmapfe/nmapfe: # @echo "FAILURES HERE ARE OK -- THEY JUST MEAN YOU CANNOT USE nmapfe" # -rm -f nmapfe/Makefile diff --git a/nse_auxiliar.cc b/nse_auxiliar.cc index 9b6de3f62f..2b6fa35214 100644 --- a/nse_auxiliar.cc +++ b/nse_auxiliar.cc @@ -1,5 +1,3 @@ -#ifndef NOLUA - /*=========================================================================*\ * Auxiliar routines for class hierarchy manipulation * LuaSocket toolkit @@ -132,4 +130,3 @@ void *auxiliar_getclassudata(lua_State *L, const char *classname, int objidx) { return luaL_checkudata(L, objidx, classname); } -#endif /* NOLUA */ diff --git a/nse_bitlib.cc b/nse_bitlib.cc index c48bf6293c..96b793c54c 100644 --- a/nse_bitlib.cc +++ b/nse_bitlib.cc @@ -7,7 +7,6 @@ * warranty. * the most recent copy can be found at http://rrt.sc3d.org/Software/Lua/ **/ -#ifndef NOLUA extern "C" { #include "lauxlib.h" @@ -74,4 +73,3 @@ LUALIB_API int luaopen_bitlib (lua_State *L) { return 1; } -#endif /* NOLUA */ diff --git a/nse_debug.cc b/nse_debug.cc index e2ec436973..a07e9cf395 100644 --- a/nse_debug.cc +++ b/nse_debug.cc @@ -1,5 +1,3 @@ -#ifndef NOLUA - #include "nse_debug.h" void l_dumpStack(lua_State* l) { @@ -58,4 +56,3 @@ void l_dumpFunction(lua_State* l, int index) { fflush(stdout); } -#endif /* NOLUA */ \ No newline at end of file diff --git a/nse_init.cc b/nse_init.cc index fcb3e9553d..6152521bf4 100644 --- a/nse_init.cc +++ b/nse_init.cc @@ -1,5 +1,3 @@ -#ifndef NOLUA - #include "nse_init.h" #include "nse_nmaplib.h" #include "nse_macros.h" @@ -650,4 +648,3 @@ int init_loadfile(lua_State* l, char* filename) { return SCRIPT_ENGINE_SUCCESS; } -#endif /* NOLUA */ diff --git a/nse_main.cc b/nse_main.cc index 4e71f1b2d0..f5b5d056a9 100644 --- a/nse_main.cc +++ b/nse_main.cc @@ -1,5 +1,3 @@ -#ifndef NOLUA - #include "nse_main.h" extern "C" { @@ -588,4 +586,3 @@ int process_preparethread(lua_State* l, struct run_record rr, struct thread_reco } -#endif /* NOLUA */ diff --git a/nse_nmaplib.cc b/nse_nmaplib.cc index dd9b25f724..ecc404ecbe 100644 --- a/nse_nmaplib.cc +++ b/nse_nmaplib.cc @@ -1,5 +1,3 @@ -#ifndef NOLUA - #include "nse_nmaplib.h" #include "nse_nsock.h" #include "nse_macros.h" @@ -439,4 +437,3 @@ static int l_exc_newtry(lua_State *l) { return 1; } -#endif /* NOLUA */ diff --git a/nse_nsock.cc b/nse_nsock.cc index ecc2820027..a87760793d 100644 --- a/nse_nsock.cc +++ b/nse_nsock.cc @@ -1,5 +1,3 @@ -#ifndef NOLUA - #include "nse_nsock.h" #include "nse_auxiliar.h" #include "nse_macros.h" @@ -426,4 +424,3 @@ static int l_nsock_set_timeout(lua_State* l) { return 0; } -#endif /* NOLUA */ diff --git a/nse_pcrelib.cc b/nse_pcrelib.cc index 2b68406c1f..95d402e96d 100644 --- a/nse_pcrelib.cc +++ b/nse_pcrelib.cc @@ -2,7 +2,6 @@ /* Reuben Thomas nov00-18dec04 */ /* Shmuel Zeigerman may04-18dec04 */ -#ifndef NOLUA #include #include @@ -374,4 +373,3 @@ LUALIB_API int luaopen_pcrelib(lua_State *L) return 1; } -#endif /* NOLUA */ diff --git a/nse_string.cc b/nse_string.cc index bd8a508ecc..6a334b9204 100644 --- a/nse_string.cc +++ b/nse_string.cc @@ -1,5 +1,3 @@ -#ifndef NOLUA - #include "nse_string.h" #include "nbase.h" @@ -81,4 +79,3 @@ char* nse_hexify(const void *data, unsigned int data_len) { return strdup(osDump.str().c_str()); } -#endif