#
# File:		makefile.dos
# Author:	Julian Smart
# Created:	1993
# Updated:	
# Copyright:	(c) 1993, AIAI, University of Edinburgh
#
# "%W% %G%"
#
# 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 $(WXDIR)\contrib\fafa\fafa.lib
LIBS=$(WXLIB) libw llibcew commdlg shell ctl3d

!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.dos FINAL=$(FINAL)
        cd $(THISDIR)

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


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

minimal.obj:      minimal.cc
        cl @<<
$(CPPFLAGS) /c /Tp $*.cc
<<

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

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