#
# File:		makefile.dos
# Author:	Julian Smart
# Created:	1993
# Updated:	
# Copyright:	(c) 1993, AIAI, University of Edinburgh
#
# "%W% %G%"
#
# Makefile : Builds hello example (DOS).
# Use FINAL=1 argument to nmake to build final version with no debugging
# info

# Set WXDIR for your system
WXDIR = $(WX)
THISDIR = $(WXDIR)\samples\hello
WXLIB = $(WXDIR)\lib\wx.lib
LIBS=$(WXLIB) oldnames libw llibcew commdlg shell $(WXDIR)\contrib\fafa\fafa.lib $(WXDIR)\contrib\ctl3d\ctl3d.lib
INC=-I$(WXDIR)\include\base -I$(WXDIR)\include\msw
DUMMY=$(WXDIR)\src\msw\dummy.obj

!ifndef FINAL
FINAL=0
!endif

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

HEADERS = hello.h
SOURCES = hello.cc
OBJECTS = hello.obj

hello:    hello.exe

all:    wx hello.exe

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

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


hello.exe:      $(DUMMY) $(WXLIB) hello.obj hello.def hello.res
        link $(LINKFLAGS) @<<
$(DUMMY) hello.obj,
hello,
NUL,
$(LIBS),
hello.def
;
<<
        rc -31 -K hello.res

hello.obj:      hello.h hello.cc $(DUMMY)
        cl @<<
$(CPPFLAGS) /c /Tp $*.cc
<<

hello.res :      hello.rc $(WXDIR)\include\msw\wx.rc
    rc -r /i$(WXDIR)\include\msw /i$(WXDIR)\contrib\fafa hello

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