#
# File:		makefile.bcc
# Author:	Julian Smart
# Created:	1993
# Updated:	
# Copyright:	(c) 1993, AIAI, University of Edinburgh
#
# "%W% %G%"
#
# Makefile : Builds wxProperty library

# Change WXDIR to wherever wxWindows is found
WXDIR = $(WXWIN)
!include $(WXDIR)\src\makebcc.env

WXLIB = $(WXDIR)\lib\wx.lib
WXINC = $(WXDIR)\include
CFG = $(WXWIN)\src\wxwin.cfg
BCCDIR = d:\bc4

WXPROPDIR = $(WXDIR)\utils\wxprop
WXPROPINC = $(WXPROPDIR)\src
WXPROPLIB = $(WXPROPDIR)\lib\wxprop.lib

FAFALIB = $(WXDIR)\contrib\fafa\fafa.lib
ITSYLIB = $(WXDIR)\contrib\itsybits\itsy.lib

DOCDIR = $(WXPROPDIR)\docs
DOCUTILSDIR = $(WXDIR)\utils\tex2rtf\src
THISDIR = $(WXPROPDIR)\src

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

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

LIBS=$(WXLIB) $(WXPROPLIB) mathwl cwl import

!if "$(FINAL)" == "0"
LINKFLAGS=/v/Vt /Twe /L$(WXDIR)\lib;$(BCCDIR)\lib
OPT = -Od
DEBUG_FLAGS= -v
!else
LINKFLAGS=/Twe /L$(WXDIR)\lib;$(BCCDIR)\lib
OPT = -O2
DEBUG_FLAGS=
!endif
CFLAGS=$(DEBUG_FLAGS) $(OPT) /DUSE_DEFINE @$(CFG)
CPPFLAGS=$(DEBUG_FLAGS) $(OPT) /DUSE_DEFINE @$(CFG)

OBJECTS = wx_prop.obj wx_plist.obj wx_pform.obj

all:    $(WXPROPLIB) # test.exe

.$(SRCSUFF).obj:
	bcc $(CPPFLAGS) -c {$< }
.c.obj:
	bcc $(CPPFLAGS) -P- -c {$< }

$(WXPROPLIB):      $(OBJECTS)
        erase $(WXPROPLIB)
        tlib /P128 @&&!
$(WXPROPLIB) &
+$(OBJECTS:.obj =.obj +)
!

test.obj:      test.h wx_prop.h test.$(SRCSUFF)

wx_prop.obj:      wx_prop.h wx_prop.$(SRCSUFF)

wx_plist.obj:      wx_prop.h wx_plist.h wx_plist.$(SRCSUFF)

wx_pform.obj:      wx_prop.h wx_pform.h wx_pform.$(SRCSUFF)

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

test.exe:      test.obj test.def test.res $(WXPROPLIB)
        tlink $(LINKFLAGS) @&&!
c0wl.obj test.obj
test
nul
$(LIBS)
test.def
!
        rc -K test.res

clean:
        -erase *.obj
        -erase *.exe
        -erase *.res
		-erase ..\lib\*.lib

