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

WXDIR = $(WX)
THISDIR = $(WXDIR)\samples\form
WXLIB = $(WXDIR)\lib\wx.lib $(WXDIR)\contrib\fafa\fafa.lib
LIBS=$(WXLIB) libw llibcew commdlg shell ctl3d

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

!ifndef FINAL
FINAL=0
!endif

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

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

all:    form.exe

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

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


form.exe:      $(WXDIR)\src\msw\dummy.obj $(WXLIB) form.obj form.def form.res
        link $(LINKFLAGS) @<<
$(WXDIR)\src\msw\dummy.obj form.obj,
form,
NUL,
$(LIBS),
form.def
;
<<
        rc -30 -K form.res

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

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

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