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

WXDIR = $(WXWIN)

!include $(WXDIR)\src\makemsc.env

THISDIR = $(WXDIR)\utils\wxprop\src
WXLIB = $(WXDIR)\lib\wx.lib

PROPLIB = $(WXDIR)\utils\wxprop\lib\wxprop.lib
DOCDIR = $(WXDIR)\utils\wxprop\docs

LIBS=$(WXLIB) $(PROPLIB) oldnames libw llibcew commdlg shell ddeml
INC=/I$(WXDIR)\include\base /I$(WXDIR)\include\msw

# Default is to output RTF for WinHelp
!ifndef RTFSTYLE
RTFSTYLE=-winhelp
!endif

OBJECTS = prop.obj proplist.obj propform.obj
TESTOBJECTS = test.obj

all:    $(PROPLIB)

test:    test.exe

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

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

$(PROPLIB):      $(OBJECTS)
        -erase $(PROPLIB)
        lib /PAGESIZE:128 @<<
$(PROPLIB)
y
$(OBJECTS)
nul
;
<<

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

test.obj:      test.h wx_prop.h test.$(SRCSUFF)
        cl @<<
$(CPPFLAGS) /c /Tp $*.$(SRCSUFF)
<<

prop.obj:      prop.h prop.$(SRCSUFF)
        cl @<<
$(CPPFLAGS) /c /Tp $*.$(SRCSUFF)
<<

proplist.obj:      prop.h proplist.h proplist.$(SRCSUFF)
        cl @<<
$(CPPFLAGS) /c /Tp $*.$(SRCSUFF)
<<

propform.obj:      prop.h propform.h propform.$(SRCSUFF)
        cl @<<
$(CPPFLAGS) /c /Tp $*.$(SRCSUFF)
<<

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

# Making documents
docs:   hlp
hlp: $(DOCDIR)/prop.hlp
hlp32: $(DOCDIR)/hlp32/prop.hlp
rtf:    $(DOCDIR)/prop.rtf

$(DOCDIR)/prop.hlp:         $(DOCDIR)/prop.rtf $(DOCDIR)/prop.hpj
        cd $(DOCDIR)
        -erase prop.ph
        hc prop
        cd $(THISDIR)

$(DOCDIR)/hlp32/prop.hlp:         $(DOCDIR)/hlp32/prop.rtf $(DOCDIR)/hlp32/prop.hpj
        cd $(DOCDIR)/hlp32
        -erase prop.ph
        start /w hcw /c /e clockwrk.hpj
        cd $(THISDIR)

$(DOCDIR)/prop.rtf:         $(DOCDIR)/classes.tex $(DOCDIR)/body.tex $(DOCDIR)/prop.tex
        cd $(DOCDIR)
        -wx /W tex2rtf $(DOCDIR)/prop.tex $(DOCDIR)/prop.rtf -twice $(RTFSTYLE)
        cd $(THISDIR)

$(DOCDIR)/hlp32/prop.rtf:         $(DOCDIR)/classes.tex $(DOCDIR)/body.tex $(DOCDIR)/prop.tex
        cd $(DOCDIR)
        -wx /W tex2rtf $(DOCDIR)/prop.tex $(DOCDIR)/hlp32/prop.rtf -twice -winhelp -macros $(DOCDIR)/t2rtf32.ini
        cd $(THISDIR)

wordrtf: 
        cd $(DOCDIR)
        -wx /W tex2rtf $(DOCDIR)/prop.tex $(DOCDIR)/prop.rtf -twice -rtf
        cd $(THISDIR)

cleanrtf:
        cd $(DOCDIR)
        -erase *.rtf
        cd  $(THISDIR)

clean:
        -erase *.obj
        -erase *.sbr
        -erase *.exe
        -erase *.res
        -erase *.map
        -erase *.pdb
        -erase $(PROPLIB)
