# Makefile for model collision information builder
#
TARGET=mcibuild.exe

BR_BASE_DIR=c:\brender
#BR_BASE_DIR=t:\brender\v1_3

WTC_BASE_DIR=t:\WTC_106

# Fixed, Release, Register
#LIB_TYPE=wxdr
#LIB_TYPE_NB=wdr
#LIB_TYPE_EX=4gwdr
#BASED=FIXED

## Float, Release, Register
LIB_TYPE=wfdr
LIB_TYPE_NB=wdr
LIB_TYPE_EX=4gwdr
BASED=FLOAT

#LIB_TYPE=wfrr
#LIB_TYPE_NB=wrr
#LIB_TYPE_EX=4gwrr
#BASED=FLOAT

CC=wcc386
CFLAGS=-omairnet -d3 -zp4 -5r -fp5&
 -DBASED_$(BASED)=1&
 -I$(BR_BASE_DIR)\inc&
 -I$(BR_BASE_DIR)\dosio&

OBJS=&
    mcibuild.obj&
    mci.obj&
    collide.obj&

LIBS=&
    $(BR_BASE_DIR)/lib/brfm$(LIB_TYPE).lib&
    $(BR_BASE_DIR)/lib/brdb$(LIB_TYPE).lib&
    $(BR_BASE_DIR)/lib/brmt$(LIB_TYPE).lib&
    $(BR_BASE_DIR)/lib/brfw$(LIB_TYPE_NB).lib&
    $(BR_BASE_DIR)/lib/brpm$(LIB_TYPE_NB).lib&
    $(BR_BASE_DIR)/lib/dosio$(LIB_TYPE_NB).lib&
    $(BR_BASE_DIR)/lib/brst$(LIB_TYPE_NB).lib&
    $(BR_BASE_DIR)/lib/hst$(LIB_TYPE_EX).lib&

# Default rules
#
# Cope with long command lines
#
.c.obj:
    set _ARGS=$(CFLAGS) $*.c
    $(CC) @_ARGS

$(TARGET): $(OBJS) wlink.rsp
    wlink debug all @wlink.rsp

# Link response file
#
wlink.rsp: makefile
	echo name $(TARGET) >wlink.rsp
	echo system dos4g >>wlink.rsp
	echo option dosseg,caseexact,quiet,stack=64k >>wlink.rsp
	for %i in ($(OBJS)) do echo file %i >>wlink.rsp
	for %i in ($(LIBS)) do echo library %i >>wlink.rsp

