#
# 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 = $(WXWIN)

THISDIR = $(WXDIR)\samples\hello
WXLIB = $(WXDIR)\lib\wx.lib
LIBS=$(WXLIB) oldnames libw llibcew commdlg ddeml shell mmsystem
INC=-I$(WXDIR)\include\base -I$(WXDIR)\include\msw
DUMMY=$(WXDIR)\src\msw\dummy.obj

# Set this to nothing if using MS C++ 7
ZOPTION=/Z7

!ifndef FINAL
FINAL=0
!endif

!if "$(FINAL)" == "0"
CPPFLAGS=/AL /W3 /Zi $(ZOPTION) /G2sw /Od $(INC) /YuWX.H /Dwx_msw /Fp$(WXDIR)\src\msw\wx.pch
LINKFLAGS=/NOD /CO /ONERROR:NOEXE /SEG:256
!else
CPPFLAGS=/AL /W3 /G2sw $(INC) /Ox /YuWX.H /Dwx_msw /Fp$(WXDIR)\src\msw\wx.pch
LINKFLAGS=/NOD /ONERROR:NOEXE /SEG:256
!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
