##!dmake -f

# main goal of this Makefile:
# BIN2C: A Converter binary -> C array

# source in the Free-Dos initialization 
.INCLUDE .FIRST .IGNORE : fd_init.mk ../fd_init.mk ../../fd_init.mk

#
#Project related settings
#
.IF $(_USEMC)
PRG = bin2c.com
.ELSE
PRG = bin2c.exe
.ENDIF
SRC = bin2c.c
OBJ = bin2c.obj
HDR =
MYCFLAGS = # TEST=YES
MSGLIB !:= msg.lib
MSGDCL !:= yerror.h
LDLIBS = $(MSGLIB) $(FDLIB)\Msg_$(_MODEL).lib $(FDLIB)\Fd_$(_MODEL).lib

#
#First target
#
all : $(CFG) $(PRG)	# copy library into Free-Dos library dir

.INIT : $(CFG) tags ref errlist # Will make the utilizing files

#
#C initialization file
#
.IF $(CFG)
# Compiler configuration file, for Borland C only
# options: no Windows, no RTTI, use pre-compiled headers, no floating point

CONFIGURATION = -W-	\
-X-	\
-H	\
-I.;$(INCDIR)	\
-L.;$(LIBDIR)	\
-H=bin2c.csm	\
-f-	\
-ff-	\
-m$(_MODEL)

.IF $(USE31) == $(NULL)
CONFIGURATION += -RT-
.ENDIF

$(CFG) : $(MAKEFILE:s/-f//)
	Cat $(mktmp $(CONFIGURATION:t"\n")\n) >$@

.ENDIF


$(PRG) : $(MSGLIB) $(OBJ) 

#MAKEDEP START
bin2c.obj : bin2c.c
#MAKEDEP STOP

ci :: $(shell dir /b *.1 *.1g)

# source in the Free-Dos standard targets 
.INCLUDE .FIRST .IGNORE : fd_exit.mk ../fd_exit.mk ../../fd_exit.mk
