Ethereal-dev: [Ethereal-dev] Again patches for nmake makefiles

Note: This archive is from the project's previous web site, ethereal.com. This list is no longer active.

From: Lars Roland <[email protected]>
Date: Thu, 29 Jul 2004 04:41:50 +0200
Hello all,

Many people have recently reported many problems with the nmake build process. It seems that these problems come from using epan/makefile.nmake to compile the DISSECTOR_SUPPORT_SOURCES which are located in /trunk.
Nmake from MSVC6 puts the object code of the DISSECTOR_SUPPORT_SOURCES 
in /epan although Nmake expects the object code in /trunk when it 
checkes dependencies. Thus DISSECTOR_SUPPORT_OBJECTS are built every 
time even when they are already there.
Nmake Version 1.5 (MSVC 2003 Toolkit) puts the object code of the 
DISSECTOR_SUPPORT_SOURCES in /trunk instead.
This makes it impossible to use epan/makefile.nmake for compiling the 
DISSECTOR_SUPPORT_SOURCES and to make it work for both versions of nmake.
We have to use /trunk/makefile.nmake for compiling the 
DISSECTOR_SUPPORT_SOURCES to solve these issues.
Patch is attached.
It should also be possible to build ethereal without libethereal.dll again.

Please check in.

Once we have moved all DISSECTOR_SUPPORT_SOURCES into a subdirectory of epan we can get rid of this patchwork in the nmake makefiles.
Regards,
Lars
Index: ethereal-svn/Makefile.nmake
===================================================================
--- ethereal-svn/Makefile.nmake	(revision 11559)
+++ ethereal-svn/Makefile.nmake	(working copy)
@@ -27,13 +27,13 @@
 
 include Makefile.common
 
-#include epan\Makefile.common
+include epan\Makefile.common
 
 BUILT_SOURCES =	$(BUILT_SOURCES) \
 	svnversion.h
 
-#DISSECTOR_SUPPORT_SRC = $(DISSECTOR_SUPPORT_SRC:../=)
-#DISSECTOR_SUPPORT_OBJECTS = $(DISSECTOR_SUPPORT_SRC:.c=.obj)
+DISSECTOR_SUPPORT_SRC = $(DISSECTOR_SUPPORT_SRC:../=)
+DISSECTOR_SUPPORT_OBJECTS = $(DISSECTOR_SUPPORT_SRC:.c=.obj)
 #DISSECTOR_SUPPORT_OBJECTS = $(DISSECTOR_SUPPORT_OBJECTS:../=)
 
 ethereal_OBJECTS = $(ethereal_SOURCES:.c=.obj)
Index: ethereal-svn/epan/Makefile.nmake
===================================================================
--- ethereal-svn/epan/Makefile.nmake	(revision 11559)
+++ ethereal-svn/epan/Makefile.nmake	(working copy)
@@ -27,6 +27,9 @@
 	dfilter\dfilter.lib \
 	dissectors\dissectors.lib
 
+# declare before .c.obj::
+DISSECTOR_SUPPORT_OBJECTS = $(DISSECTOR_SUPPORT_SRC:.c=.obj)
+
 .c.obj::
 	$(CC) $(CVARSDLL) $(CFLAGS) -Fd.\ -c $<
 
@@ -79,7 +82,7 @@
 libethereal.exp: libethereal.dll
 
 #DISSECTOR_SUPPORT_SRC = $(DISSECTOR_SUPPORT_SRC:../=)
-DISSECTOR_SUPPORT_OBJECTS = $(DISSECTOR_SUPPORT_SRC:.c=.obj)
+#DISSECTOR_SUPPORT_OBJECTS = $(DISSECTOR_SUPPORT_SRC:.c=.obj)
 #DISSECTOR_SUPPORT_OBJECTS = $(DISSECTOR_SUPPORT_OBJECTS:../=)
 
 libethereal.dll: ..\config.h $(OBJECTS) libethereal.def ftypes dfilter dissectors $(DISSECTOR_SUPPORT_OBJECTS) doxygen $(EXTRA_OBJECTS) ..\image\libethereal.res
@@ -92,7 +95,7 @@
 		 $(DISSECTOR_SUPPORT_OBJECTS) $(EXTRA_OBJECTS)
 
 ethereal.lib	: ..\config.h $(OBJECTS)
-	link /lib /out:ethereal.lib $(OBJECTS) $(EXTRA_OBJECTS)
+	link /lib /out:ethereal.lib $(OBJECTS) $(EXTRA_OBJECTS) $(DISSECTOR_SUPPORT_OBJECTS)
 
 ..\config.h	: ..\config.h.win32 ..\config.nmake
 	cd ..
@@ -100,7 +103,7 @@
 	cd epan
 
 clean:
-	rm -f $(OBJECTS) $(DISSECTOR_SUPPORT_OBJECTS:../=) $(EXTRA_OBJECTS) ethereal.lib libethereal.dll libethereal.lib libethereal.exp $(PDB_FILE) doxygen.cfg html/*.*
+	rm -f $(OBJECTS) $(DISSECTOR_SUPPORT_OBJECTS) $(EXTRA_OBJECTS) ethereal.lib libethereal.dll libethereal.lib libethereal.exp $(PDB_FILE) doxygen.cfg html/*.*
 	if exist html rmdir html	
 	cd ftypes
 	$(MAKE) /$(MAKEFLAGS) -f Makefile.nmake clean