Mailing List Archive

NessusClient/nessus Makefile,1.16,1.17
Update of /usr/local/cvs/NessusClient/nessus
In directory raccoon.nessus.org:/tmp/cvs-serv45980

Modified Files:
Makefile
Log Message:
Use a variable for the target executable name.
Added some compile options for Cygwin environment, one
being to add ".exe" to the executable name.


Index: Makefile
===================================================================
RCS file: /usr/local/cvs/NessusClient/nessus/Makefile,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -d -r1.16 -r1.17
--- Makefile 29 May 2006 17:04:38 -0000 1.16
+++ Makefile 5 Jul 2006 14:05:42 -0000 1.17
@@ -8,6 +8,17 @@
NESSUS_INCLUDE=`sh ./cflags`
CFLAGS+=-Wall

+# The name of the executable:
+NESSUSCLIENT=NessusClient
+
+# Add some specific Windows compile options for Cygwin
+SYSTEM:=$(shell uname -o)
+ifeq ($(SYSTEM), Cygwin)
+CFLAGS+=-mms-bitfields
+LDFLAGS+=-mwindows
+NESSUSCLIENT=NessusClient.exe
+endif
+
OBJS = auth.o \
nessus_plugin.o \
comm.o \
@@ -64,23 +75,22 @@
GTK_OBJS = prefs_comment.o prefs_context.o prefs_options.o prefs_report.o \
prefs_dialog_prefs.o prefs_scan_assistant.o pdf_output.o readonly.o

-all : cflags ${make_bindir}/NessusClient
+all : cflags ${make_bindir}/$(NESSUSCLIENT)


-${make_bindir}/NessusClient : cflags NessusClient
+${make_bindir}/$(NESSUSCLIENT) : cflags $(NESSUSCLIENT)
test -d ${make_bindir} || mkdir ${make_bindir}
- cp NessusClient ${make_bindir}
+ cp $(NESSUSCLIENT) ${make_bindir}

-
cflags :
- @echo "$(NESSUS_CFLAGS) $(NESSUS_DEFS) -DPACKAGE=\"NessusClient\" $(INCLUDE)" | sed 's/\"/\\\"/g' > cflags.tmp
+ @echo "$(NESSUS_CFLAGS) $(NESSUS_DEFS) -DPACKAGE=\"$(NESSUSCLIENT)\" $(INCLUDE)" | sed 's/\"/\\\"/g' > cflags.tmp
@echo "echo \"`cat cflags.tmp`\"" > cflags
@rm cflags.tmp
@chmod +x cflags

-NessusClient : cflags $(OBJS) $(if $(USE_GTK),$(GTK_OBJS)) \
+$(NESSUSCLIENT) : cflags $(OBJS) $(if $(USE_GTK),$(GTK_OBJS)) \
../libnessus/libnessus-client.a
- $(CC) $(LDFLAGS) $(OBJS) $(if $(USE_GTK),$(GTK_OBJS)) -o NessusClient $(LIBS)
+ $(CC) $(LDFLAGS) $(OBJS) $(if $(USE_GTK),$(GTK_OBJS)) -o $(NESSUSCLIENT) $(LIBS)


context.o : cflags context.c context.h error_dialog.h comm.h plugin_cache.h
@@ -202,8 +212,7 @@

nbe_output.o : cflags nbe_output.c nbe_output.h error_dialog.h
$(CC) $(CFLAGS) $(NESSUS_INCLUDE) -c nbe_output.c
-
-
+
html_output.o : cflags html_output.c html_output.h error_dialog.h globals.h
$(CC) $(CFLAGS) $(NESSUS_INCLUDE) -c html_output.c

@@ -229,7 +238,7 @@
context.h report.h xpm/computer.xpm \
prefs_dialog/prefs_context.h prefs_dialog/prefs_scope_tree.h
$(CC) $(CFLAGS) $(NESSUS_INCLUDE) -c monitor_dialog.c
-
+
backend.o : cflags backend.c backend.h error_dialog.h
$(CC) $(CFLAGS) $(NESSUS_INCLUDE) -c backend.c

@@ -307,5 +316,5 @@
gdchart0.94b/gdc_pie.o : cflags
cd gdchart0.94b && $(MAKE)
clean :
- rm -f *.o NessusClient *~ cflags prefs_dialog/*.o
+ rm -f *.o $(NESSUSCLIENT) *~ cflags prefs_dialog/*.o
cd gdchart0.94b && $(MAKE) clean

_______________________________________________
Nessus-cvs mailing list
Nessus-cvs@list.nessus.org
http://mail.nessus.org/mailman/listinfo/nessus-cvs