#
# 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 wxToolbar library
# Use FINAL=1 argument to nmake to build final version with no debugging
# info

# Set WXDIR for your system
WXDIR = $(WX)
WXLIB = $(WXDIR)\lib\wx.lib

INC = /I$(WXDIR)\include\base /I$(WXDIR)\include\msw
TOOLBARLIB = ..\lib\toolbar.lib
THISDIR = $(WXDIR)\utils\toolbar\src
#
# Not used
#
#LIBS=$(WXLIB) $(TOOLBARLIB)

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

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

OBJECTS = test.obj

all:    $(TOOLBARLIB)

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.
#
#$(TOOLBARLIB):      wx_tbar.obj
#        erase $(TOOLBARLIB)
#        lib  /PAGESIZE:128 @<<
#$(TOOLBARLIB)
#y
#wx_tbar.obj
#nul
#;
#<<

#
# NT lib.
#
$(TOOLBARLIB): wx_tbar.obj
	-erase $(TOOLBARLIB)
	$(implib) @<<
-out:$(TOOLBARLIB)
-machine:$(CPU)
wx_tbar.obj
<<

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

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


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

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

clean:
        -erase *.obj *.exe *.res *.map *.lib $(TOOLBARLIB)
