#  Makefile from ObjectProDSP 0.1
#  Copyright (C) 1994, Mountain Math Software, All rights reserved.
#  Licensed for free use and distribution under version 2 of the Gnu General
#  Public License. Please see file COPYING for details and restrictions.
#  
#  ObjectProDSP is a trademark of Mountain Math Software.
#  
EXE= ${OPD_ROOT}/bin/hyphen ${OPD_ROOT}/bin/toc_depth  \
	${OPD_ROOT}/bin/cp_part ${OPD_ROOT}/bin/remove_orig \
	${OPD_ROOT}/bin/to_low_arg ${OPD_ROOT}/bin/nametrans \
	${OPD_ROOT}/bin/cmp_val_log  ${OPD_ROOT}/bin/gen_data \
	${OPD_ROOT}/bin/gen_dpp_code ${OPD_ROOT}/bin/report_test \
	${OPD_ROOT}/bin/compare_byte

LIB_1=${OPD_ROOT}/lib/Libopdcom
LIB_2=${OPD_ROOT}/lib/Libopdnogui
LIB_3=${OPD_ROOT}/lib/Libopdgen
LIB=${LIB_1} ${LIB_2} ${LIB_3}

ALL: ${EXE}

INC_DIR_1=${OPD_ROOT}/src/include
INC_DIR_2=${OPD_ROOT}/src/include/ObjProNoGui

INC= -I${INC_DIR_1} -I${INC_DIR_2}

FLAGS= -g ${INC}

${OPD_ROOT}/bin/hyphen : hyphen.C
	g++ ${FLAGS} $< -o $@

${OPD_ROOT}/bin/toc_depth : toc_depth.C
	g++ ${FLAGS} $< -o $@

${OPD_ROOT}/bin/cp_part: cp_part.C
	g++ ${FLAGS} $< -o $@

${OPD_ROOT}/bin/remove_orig: remove_orig.C
	g++ ${FLAGS} $< -o $@

${OPD_ROOT}/bin/to_low_arg: to_low_arg.C
	g++ ${FLAGS} $< -o $@


${OPD_ROOT}/bin/gen_data: gen_data.C gen_datx.C gen_data.h ${LIB}
	g++ ${FLAGS} $< gen_datx.C ${LIB} ${LIB} -o $@ 

${OPD_ROOT}/bin/cmp_val_log: cmp_val_log.C ${LIB}
	g++ ${FLAGS} $< ${LIB} -o $@

${OPD_ROOT}/bin/compare_byte: compare_byte.C ${LIB}
	g++ ${FLAGS} $< ${LIB} -o $@

${OPD_ROOT}/bin/report_test: report_test.C ${LIB}
	g++ ${FLAGS} $< ${LIB} -o $@

${OPD_ROOT}/bin/nametrans: nametrans.C
	g++ ${FLAGS} $< -o $@

${OPD_ROOT}/bin/gen_dpp_code: gen_dpp_code.C ${LIB_1}
	g++ ${FLAGS} $< ${LIB_1} -o $@

${LIB_1}:
	cd ${OPD_ROOT}/src/genlib/nogui/obj ; make

${LIB_2}:
	cd ${OPD_ROOT}/src/genlib/common/obj ; make

${EXE}: ${INC_DIR_1}/ObjProGen/mkstr.h ${INC_DIR_1}/ObjProDSP/portable.h \
	${INC_DIR_1}/ObjProGen/cpyrght_exe.h ${INC_DIR_1}/ObjProGen/environ.h \
	${INC_DIR_1}/ObjProGen/makedir.h ${INC_DIR_2}/ObjProComGui/cgidbg.h  \
	${INC_DIR_1}/ObjProGen/copyright.h ${INC_DIR_1}/ObjProDSP/mpacket.h \
	${INC_DIR_1}/ObjProDSP/pltenm.h
