#
# File:		makefile.nt
# Author:	Julian Smart
# Created:	1993
# Updated:	
# Copyright:	(c) 1993, AIAI, University of Edinburgh
#
# "%W% %G%"
#
#
#	NT-Specific, using SDK
#
!include <ntwin32.mak>
OS_SPEC=/nologo -DWINNT -DMS_WINDOWS -Dwx_msw
ALLFLAGS= $(OS_SPEC) $(cflags) $(cvars) $(cdebug)

# Makefile : Builds wxWindows library wx.lib for Windows 3.1
# Arguments:
#
# FINAL=1 argument to nmake to build version with no debugging info.
# DLL=1 builds a library (wxdll.lib) suitable for creating DLLs.
#
# Set WXDIR to the wxWindows directory if env. variable WX not set.
#
WXDIR = $(WX)
WXLIB = $(WXDIR)\lib
WXINC = $(WXDIR)\include\msw
WXBASEINC = $(WXDIR)\include\base

INC=/I$(WXINC) /I$(WXBASEINC)
LIBTARGET= $(WXLIB)\wx.lib
DUMMY=dummy

#---------------------------------------------------------------------
# Not yet tested with NT
#
#!ifndef FINAL
#FINAL=0
#!endif

#!ifndef DLL
#DLL=0
#!endif

# Note we optimize anyway, since we don't debug this often, and optimizing
# doesn't do any harm to this module.
#!if "$(FINAL)" == "0"
#OPT = /Od
#DEBUG_FLAGS= /Zi
#LINK_DEBUG_FLAGS=/CO
#!else
#OPT = /Ox
#DEBUG_FLAGS=
#LINK_DEBUG_FLAGS=
#!endif

#PRECOMP=/YuWX.H

#!if "$(DLL)" == "0"
#PCH=WX.PCH
#CPPFLAGS= $(DEBUG_FLAGS) $(INC) /AL /W3 /G2sw $(OPT) /Dwx_msw $(PRECOMP) /Fp$(WXDIR)\src\msw\wx.pch
#LINKFLAGS=$(LINK_DEBUG_FLAGS) /NOD /ONERROR:NOEXE
#LIBTARGET= $(WXLIB)\wx.lib
#DUMMY=dummy
#!else
#PCH=WXDLL.PCH
#CPPFLAGS= $(DEBUG_FLAGS) $(INC) /ALw /W3 /G2sw /GD $(OPT) /Dwx_msw $(PRECOMP) /Fp$(WXDIR)\src\msw\wx.pch
#LINKFLAGS=$(LINK_DEBUG_FLAGS) /NOD /ONERROR:NOEXE
#LIBTARGET= $(WXLIB)\wxdll.lib
#DUMMY=dummydll
#!endif

# Not used (and not valid.)
#LIBS=libw llibcew
#---------------------------------------------------------------------

ITEMS =  $(WXBASEINC)\wb_item.h $(WXBASEINC)\wb_buttn.h $(WXBASEINC)\wb_check.h\
 $(WXBASEINC)\wb_choic.h $(WXBASEINC)\wb_menu.h $(WXBASEINC)\wb_messg.h\
 $(WXBASEINC)\wb_txt.h $(WXBASEINC)\wb_mtxt.h $(WXBASEINC)\wb_lbox.h\
 $(WXBASEINC)\wb_slidr.h
OBJECTS1 = wb_win.obj wb_frame.obj wb_panel.obj wb_utils.obj wb_main.obj\
  wb_item.obj wb_list.obj wb_obj.obj wxstring.obj

OBJECTS2 = wb_text.obj wb_gdi.obj wb_dialg.obj wb_canvs.obj wb_dc.obj wb_mf.obj\
  wb_ps.obj wb_mgstr.obj

OBJECTS3 = wb_hash.obj wb_ipc.obj wb_form.obj wb_timer.obj wb_help.obj\
  wb_sysev.obj wb_stdev.obj wb_types.obj wx_enhdg.obj

OBJECTS = $(OBJECTS1) $(OBJECTS2) $(OBJECTS3)

all: $(OBJECTS)

#
# Not yet nt
#
#$(OBJECTS): $(WXDIR)\src\msw\wx.pch

wb_obj.obj:     $(WXBASEINC)\wx_obj.h
        $(cc) @<<
$(ALLFLAGS) $(INC) /c /Tp $*.cc
<<

wb_win.obj:     $(WXBASEINC)\common.h $(WXBASEINC)\wb_win.h $(WXBASEINC)\wx_obj.h\
  $(WXBASEINC)\wx_list.h $(WXBASEINC)\wx_utils.h wb_win.cc $(WXBASEINC)\wb_gdi.h
        $(cc) @<<
$(ALLFLAGS) $(INC) /c /Tp $*.cc
<<

wb_main.obj:   $(WXBASEINC)\common.h $(WXBASEINC)\wx_obj.h $(WXBASEINC)\wb_frame.h $(WXBASEINC)\wx_utils.h\
  $(WXBASEINC)\wb_main.h wb_main.cc
        $(cc) @<<
$(ALLFLAGS) $(INC) /c /Tp $*.cc
<<

wb_frame.obj:   $(WXBASEINC)\common.h $(WXBASEINC)\wb_win.h $(WXBASEINC)\wx_obj.h $(WXBASEINC)\wx_utils.h $(WXBASEINC)\wb_frame.h wb_frame.cc\
                $(WXBASEINC)\wx_stdev.h
        $(cc) @<<
$(ALLFLAGS) $(INC) /c /Tp $*.cc
<<

wb_panel.obj:   $(WXBASEINC)\common.h $(WXBASEINC)\wb_win.h $(WXBASEINC)\wx_obj.h $(WXBASEINC)\wx_utils.h $(WXBASEINC)\wb_frame.h $(WXBASEINC)\wb_panel.h\
                wb_panel.cc $(WXBASEINC)\wx_stdev.h
        $(cc) @<<
$(ALLFLAGS) $(INC) /c /Tp $*.cc
<<

wb_text.obj:    $(WXBASEINC)\common.h $(WXBASEINC)\wb_win.h $(WXBASEINC)\wx_obj.h $(WXBASEINC)\wx_utils.h $(WXBASEINC)\wb_frame.h $(WXBASEINC)\wb_text.h\
                wb_text.cc $(WXBASEINC)\wx_stdev.h
        $(cc) @<<
$(ALLFLAGS) $(INC) /c /Tp $*.cc
<<

wb_canvs.obj:    $(WXBASEINC)\common.h $(WXBASEINC)\wb_win.h $(WXBASEINC)\wx_obj.h\
                 $(WXBASEINC)\wx_utils.h $(WXBASEINC)\wb_frame.h\
                 $(WXBASEINC)\wb_canvs.h\
                 wb_canvs.cc $(WXBASEINC)\wx_stdev.h $(WXBASEINC)\wb_gdi.h\
                 $(WXBASEINC)\wb_dc.h
        $(cc) @<<
$(ALLFLAGS) $(INC) /c /Tp $*.cc
<<

wb_dc.obj:    $(WXBASEINC)\common.h $(WXBASEINC)\wb_win.h $(WXBASEINC)\wx_obj.h\
              $(WXBASEINC)\wx_utils.h $(WXBASEINC)\wb_frame.h $(WXBASEINC)\wb_canvs.h\
                 wb_dc.cc $(WXBASEINC)\wx_stdev.h $(WXBASEINC)\wb_gdi.h $(WXBASEINC)\wb_dc.h
        $(cc) @<<
$(ALLFLAGS) $(INC) /c /Tp $*.cc
<<

wb_ps.obj:    $(WXBASEINC)\common.h $(WXBASEINC)\wb_win.h $(WXBASEINC)\wx_obj.h\
              $(WXBASEINC)\wx_utils.h $(WXBASEINC)\wb_frame.h $(WXBASEINC)\wb_canvs.h\
                 wb_ps.cc $(WXBASEINC)\wx_stdev.h $(WXBASEINC)\wb_gdi.h $(WXBASEINC)\wb_dc.h
        $(cc) @<<
$(ALLFLAGS) $(INC) /c /Tp $*.cc
<<

wb_mf.obj:    $(WXBASEINC)\common.h $(WXBASEINC)\wb_win.h $(WXBASEINC)\wx_obj.h $(WXBASEINC)\wx_utils.h $(WXBASEINC)\wb_frame.h $(WXBASEINC)\wb_canvs.h\
                 wb_mf.cc $(WXBASEINC)\wx_stdev.h $(WXBASEINC)\wb_gdi.h $(WXBASEINC)\wb_mf.h
        $(cc) @<<
$(ALLFLAGS) $(INC) /c /Tp $*.cc
<<

wb_item.obj:    $(WXBASEINC)\common.h $(WXBASEINC)\wb_win.h $(WXBASEINC)\wx_obj.h $(WXBASEINC)\wx_utils.h $(WXBASEINC)\wb_frame.h\
                $(ITEMS) wb_item.cc $(WXBASEINC)\wx_stdev.h
        $(cc) @<<
$(ALLFLAGS) $(INC) /c /Tp $*.cc
<<

wb_utils.obj:   $(WXBASEINC)\common.h $(WXBASEINC)\wx_obj.h $(WXBASEINC)\wx_utils.h wb_utils.cc
        $(cc) @<<
$(ALLFLAGS) $(INC) /c /Tp $*.cc
<<

wb_mgstr.obj:   $(WXBASEINC)\wx_mgstr.h wb_mgstr.cc
        $(cc) @<<
$(ALLFLAGS) $(INC) /c /Tp $*.cc
<<

wb_ipc.obj:   $(WXBASEINC)\common.h $(WXBASEINC)\wx_obj.h $(WXBASEINC)\wx_utils.h $(WXBASEINC)\wb_ipc.h wb_ipc.cc
        $(cc) @<<
$(ALLFLAGS) $(INC) /c /Tp $*.cc
<<

wb_list.obj:    $(WXBASEINC)\common.h $(WXBASEINC)\wx_obj.h $(WXBASEINC)\wx_list.h $(WXBASEINC)\wx_utils.h wb_list.cc
        $(cc) @<<
$(ALLFLAGS) $(INC) /c /Tp $*.cc
<<

wxstring.obj:    $(WXBASEINC)\common.h $(WXBASEINC)\wx_obj.h $(WXBASEINC)\wxstring.h wxstring.cc
        $(cc) @<<
$(ALLFLAGS) $(INC) /c /Tp $*.cc
<<

wb_hash.obj:    $(WXBASEINC)\common.h $(WXBASEINC)\wx_obj.h $(WXBASEINC)\wx_hash.h wb_hash.cc $(WXBASEINC)\wx_list.h $(WXBASEINC)\wx_utils.h
        $(cc) @<<
$(ALLFLAGS) $(INC) /c /Tp $*.cc
<<

wb_event.obj:   $(WXBASEINC)\common.h $(WXBASEINC)\wx_obj.h $(WXBASEINC)\wx_stdev.h $(WXBASEINC)\wx_utils.h wb_event.cc
        $(cc) @<<
$(ALLFLAGS) $(INC) /c /Tp $*.cc
<<

wb_gdi.obj:   $(WXBASEINC)\common.h $(WXBASEINC)\wb_gdi.h $(WXBASEINC)\wx_utils.h wb_gdi.cc
        $(cc) @<<
$(ALLFLAGS) $(INC) /c /Tp $*.cc
<<

wb_dialg.obj:   $(WXBASEINC)\common.h wb_dialg.cc $(WXBASEINC)\wb_dialg.h $(WXBASEINC)\wb_win.h\
  $(WXBASEINC)\wx_utils.h $(WXBASEINC)\wb_panel.h $(ITEMS)
        $(cc) @<<
$(ALLFLAGS) $(INC) /c /Tp $*.cc
<<

wb_form.obj:   $(WXBASEINC)\common.h wb_form.cc $(WXBASEINC)\wx_form.h $(WXBASEINC)\wb_win.h\
  $(WXBASEINC)\wx_utils.h $(WXBASEINC)\wb_panel.h
        $(cc) @<<
$(ALLFLAGS) $(INC) /c /Tp $*.cc
<<

wb_timer.obj:   $(WXBASEINC)\common.h wb_timer.cc $(WXBASEINC)\wb_timer.h
        $(cc) @<<
$(ALLFLAGS) $(INC) /c /Tp $*.cc
<<

wb_help.obj:   $(WXBASEINC)\common.h wb_help.cc $(WXBASEINC)\wx_help.h $(WXINC)\wx_ipc.h
        $(cc) @<<
$(ALLFLAGS) $(INC) /c /Tp $*.cc
<<

wb_types.obj:   $(WXBASEINC)\common.h wb_types.cc $(WXBASEINC)\wx_types.h
        $(cc) @<<
$(ALLFLAGS) $(INC) /c /Tp $*.cc
<<

wb_sysev.obj:   $(WXBASEINC)\common.h wb_sysev.cc $(WXBASEINC)\wx_sysev.h\
        $(WXBASEINC)\wx_types.h
        $(cc) @<<
$(ALLFLAGS) $(INC) /c /Tp $*.cc
<<

wb_stdev.obj:   $(WXBASEINC)\common.h wb_stdev.cc $(WXBASEINC)\wx_stdev.h\
        $(WXBASEINC)\wx_types.h $(WXBASEINC)\wx_sysev.h
        $(cc) @<<
$(ALLFLAGS) $(INC) /c /Tp $*.cc
<<

wx_enhdg.obj:   $(WXBASEINC)\common.h wx_enhdg.cc $(WXBASEINC)\wx_enhdg.h
        $(cc) @<<
$(ALLFLAGS) $(INC) /c /Tp $*.cc

clean:
        -erase $(OBJECTS1)
        -erase $(OBJECTS2)
        -erase $(OBJECTS3)
        -erase $(LIBTARGET)

cleanall: clean
        -erase *.pch *.obj ..\lib\*.lib
