#
# File:		makefile.b32
# Author:	Patrick Halke
# Created:	1995
# Updated:	
# Copyright:	(c) 1993, AIAI, University of Edinburgh
#
# "%W% %G%"
#
# Makefile : Builds 32bit wxProperty library for Windows
# and Borland C++ 4.x

WXDIR = $(WXWIN)
!include $(WXDIR)\src\makeb32.env

WXINC = $(WXDIR)\include
TARGET=test
TESTOBJECTS=test.obj
LIBTARGET= $(WXLIBDIR)\wxprop.lib
LIBS=$(WXLIB)\wx32.lib $(LIBTARGET) cw32 import32

!ifndef DEBUG
DEBUG=0
!endif

!if "$(FINAL)" == "0"
LINKFLAGS=/v /Tpe /L$(WXLIBDIR);$(BCCDIR)\lib
OPT = -Od
DEBUG_FLAGS= -v -DDEBUG=$(DEBUG)
!else
LINKFLAGS=/Tpe /L$(WXLIBDIR);$(BCCDIR)\lib
OPT = -O2
DEBUG_FLAGS = -DDEBUG=$(DEBUG)
!endif

CPPFLAGS=$(DEBUG_FLAGS) $(OPT) @$(CFG)

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

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

OBJECTS = prop.obj proplist.obj propform.obj

all:    $(LIBTARGET)

$(LIBTARGET):	$(OBJECTS)
	erase $(LIBTARGET)
	tlib $(LIBTARGET) /P32 @&&!
+$(OBJECTS:.obj =.obj +)
!

prop.obj:	prop.$(SRCSUFF) prop.h
proplist.obj:	proplist.$(SRCSUFF) prop.h proplist.h
propform.obj:	propform.$(SRCSUFF) prop.h propform.h

$(TARGET).exe:	$(TESTOBJECTS) $(LIBTARGET) $(TARGET).def $(TARGET).res
  tlink32 $(LINKFLAGS) @&&!
c0w32.obj $(TESTOBJECTS)
$(TARGET)
nul
$(LIBS) $(LIBTARGET)
$(TARGET).def
!
        brc32 -K $(TARGET).res

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

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

clean:
        -erase *.obj $(LIBTARGET) *.exe *.res *.map *.rws
