#
# File:		makefile.nt
# Author:	Julian Smart
# Created:	1993
# Updated:	
# Copyright:	(c) 1993, AIAI, University of Edinburgh
#
# "%W% %G%"
#
!include <ntwin32.mak>
OS_SPEC=/nologo -DWINNT -DMS_WINDOWS -Dwx_msw
ALLFLAGS= $(OS_SPEC) $(cflags) $(cvars) $(cdebug)
# Makefile : Builds minimal example (DOS).
# Use FINAL=1 argument to nmake to build final version with no debugging
# info

WXDIR = $(WX)
THISDIR = $(WXDIR)\samples\minimal
WXLIB = $(WXDIR)\lib\wx.lib
#
# Not used
#
#LIBS=$(WXLIB) libw llibcew commdlg shell

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

INC=/I$(WXDIR)\include\msw /I$(WXDIR)\include\base

#!if "$(FINAL)" == "0"
#CPPFLAGS=/AL /W3 /Zi /G2sw /Od /YuWX.H /Dwx_msw /Fp$(WXDIR)\src\msw\wx.pch $(INC)
#LINKFLAGS=/NOD /CO /ONERROR:NOEXE
#!else
#CPPFLAGS=/AL /W3 /G2sw /Ox /YuWX.H /Dwx_msw /Fp$(WXDIR)\src\msw\wx.pch $(INC)
#LINKFLAGS=/NOD /ONERROR:NOEXE
#!endif
#---------------------------------------------------------------------

HEADERS =
SOURCES = minimal.cc
OBJECTS = minimal.obj

all:    minimal.exe

wx:
        cd $(WXDIR)\src\msw
        nmake -f makefile.nt FINAL=$(FINAL)
        cd $(THISDIR)

wxclean:
        cd $(WXDIR)\src\msw
        nmake -f makefile.nt clean
        cd $(THISDIR)

#
# Obsol.
#
#minimal.exe:      $(WXDIR)\src\msw\dummy.obj $(WXLIB) minimal.obj minimal.def minimal.res
#        link $(LINKFLAGS) @<<
#minimal.obj $(WXDIR)\src\msw\dummy.obj,
#minimal,
#NUL,
#$(LIBS),
#minimal.def
#;
#<<
#        rc -30 -K minimal.res
#
# NT exe
#
minimal.exe:      $(WXDIR)\src\msw\dummy.obj $(WXLIB) minimal.obj minimal.res
	$(link) @<<
-out:minimal.exe
-machine:$(CPU)
-subsystem:windows
$(LINKFLAGS)
$(WXDIR)\src\msw\dummy.obj minimal.obj minimal.res
$(WXLIB)
shell32.lib $(guilibs)
<<


minimal.obj:      minimal.cc
        $(cc) @<<
$(ALLFLAGS) $(INC) /c /Tp $*.cc
<<

minimal.res :      minimal.rc $(WXDIR)\include\msw\wx.rc
    $(rc) -r /i$(WXDIR)\include\msw -fominimal.tmp minimal.rc
    $(cvtres) -$(CPU) -o minimal.res minimal.tmp
    del minimal.tmp

clean:
        -erase *.obj *.exe *.res *.map *.rws
