From Lars Roland: add support for building a libethereal.dll with MSVC:
[obnox/wireshark/wip.git] / gtk / Makefile.nmake
index 3202513275ffb5b4d636989bd17ec2b3b6b8f558..84c8c49086581718d59da0a8d21f9fd409fcab10 100644 (file)
@@ -1,39 +1,47 @@
+## Makefile for building ethereal.exe with Microsoft C and nmake
+## Use: $(MAKE) /$(MAKEFLAGS) -f makefile.nmake
+#
+# $Id: Makefile.nmake,v 1.73 2004/05/09 10:03:40 guy Exp $
+
 include ..\config.nmake
 
 ############### no need to modify below this line #########
 
-CFLAGS=/DHAVE_CONFIG_H /I.. /I../wiretap \
-       /I$(GLIB_DIR) /I$(GTK_DIR) /I$(GLIB_DIR)/gmodule \
-       /I$(GTK_DIR)\gdk /I$(GTK_DIR)\gdk\win32 $(LOCAL_CFLAGS)
-
-# gtkclist.obj is not in here because it is gtk+-1.2 code,
-# while the DLL for GTK+ on windows is gtk+-1.3, and there's
-# some functions that have disappeared in gtk+-1.3. I might
-# get around to #ifdef'ing them out in our gtkclist.c.
-OBJECTS=capture_dlg.obj \
-       column_prefs.obj \
-       display_opts.obj \
-       file_dlg.obj \
-       filter_prefs.obj \
-       find_dlg.obj \
-       goto_dlg.obj \
-       gui_prefs.obj \
-       main.obj        \
-       menu.obj        \
-       plugins_dlg.obj \
-       prefs_dlg.obj \
-       print_dlg.obj \
-       print_prefs.obj  \
-       proto_draw.obj \
-       simple_dialog.obj \
-       stream_prefs.obj \
-       summary_dlg.obj \
-       ui_util.obj
-
-
-libui.lib      : ..\config.h $(OBJECTS)
-       lib /out:libui.lib $(OBJECTS)   
-
-
-..\config.h    : ..\config.h.win32
-       copy ..\config.h.win32 ..\config.h
+CFLAGS=-DHAVE_CONFIG_H /I.. /I../wiretap $(GTK_CFLAGS) \
+       /I$(PCAP_DIR)\WPCAP\LIBPCAP /I$(PCAP_DIR)\WPCAP\LIBPCAP\bpf \
+       /I$(PCAP_DIR)\WPCAP\LIBPCAP\lbl \
+       /I$(PCAP_DIR)\include /I$(NET_SNMP_DIR)\include \
+       /I$(NET_SNMP_DIR)\win32 /Zm800 -D_U_="" -D_NEED_VAR_IMPORT_ $(LOCAL_CFLAGS)
+
+CVARSDLL=-DWIN32 -DNULL=0 -D_MT -D_DLL
+
+.c.obj::
+   $(CC) $(CVARSDLL) $(CFLAGS) -Fd.\ -c $<
+
+include Makefile.common
+
+
+# if you add files here, be sure to include them also in Makefile.am EXTRA_DIST
+ETHEREAL_WIN32_GTK_SRC = \
+       $(ETHEREAL_GTK_SRC) \
+       print_mswin.c
+
+
+ETHEREAL_TAP_OBJECTS = $(ETHEREAL_TAP_SRC:.c=.obj)
+
+
+ETHEREAL_WIN32_GTK_OBJECTS = $(ETHEREAL_WIN32_GTK_SRC:.c=.obj)
+       
+
+libui.lib      : ..\config.h $(ETHEREAL_WIN32_GTK_OBJECTS) $(ETHEREAL_TAP_OBJECTS)
+       lib /out:libui.lib $(ETHEREAL_WIN32_GTK_OBJECTS) $(ETHEREAL_TAP_OBJECTS)
+
+ethereal-tap-register.c: $(ETHEREAL_TAP_SRC) ../make-tapreg-dotc
+       @echo Making ethereal-tap-register.c
+       @$(SH) ../make-tapreg-dotc ethereal-tap-register.c . $(ETHEREAL_TAP_SRC)
+
+clean:
+       rm -f $(ETHEREAL_WIN32_GTK_OBJECTS) $(ETHEREAL_TAP_OBJECTS) libui.lib $(PDB_FILE)
+
+distclean: clean
+       rm -f ethereal-tap-register.c