#
# File:		makefile.bcc
# Author:       Andre Beltman
# Created:      1995
# Updated:	
# Copyright:    (c) 1995, AIAI, University of Edinburgh
#
# "%W% %G%"
#
# Makefile : Builds mfc example (DOS).

# WXWIN and BCCDIR are set by parent make

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

WXLIBDIR = $(WXDIR)\lib
WXINC = $(WXDIR)\include\msw
WXBASESRC = $(WXDIR)\src\base
WXBASEINC = $(WXDIR)\include\base
WXLIB = $(WXLIBDIR)\wx32.lib
FAFALIB = $(WXLIBDIR)\fafa.lib
ITSYLIB = $(WXLIBDIR)\itsy.lib
XPMLIB = $(WXLIBDIR)\xpm.lib
DIBLIB = $(WXLIBDIR)\dib.lib
GAUGELIB = $(WXLIBDIR)\gauge.lib
WXTREELIB = $(WXLIBDIR)\wxtree.lib
RCPARSERLIB = $(WXLIBDIR)\rcparser.lib
PROLOGLIB = $(WXLIBDIR)\prologio.lib
LIBS=$(WXLIB) cw32 import32 ctl3d32 $(FAFALIB) $(ITSYLIB) $(DIBLIB)\
  $(XPMLIB) $(PROLOGLIB) $(RCPARSERLIB) $(GAUGELIB) $(WXTREELIB)

TARGET=hello

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

OBJECTS = hello.obj

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

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

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

hello.obj:      hello.$(SRCSUFF)

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

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

