ifdef USE_RXNET7
CCRXFLAG = -D_USE_RXNET7
LLRXFLAG = -lrimioapi
endif

CFLAGS =	-c ${DEBUGFLAG} ${CCRXFLAG} ${C_OPT} -D${MACH_OS} -DPORT=UNIX \
	        -I./ -I../../include -I${IRIS_ROOT}/include

LDFLAGS =	       -L../../libs/lib        -L../../hardware/lib        -L../../rda/lib \
		-L${IRIS_ROOT}/libs/lib -L${IRIS_ROOT}/hardware/lib -L${IRIS_ROOT}/rda/lib

LLIBS =		${LLRXFLAG} -luser -lm

C_SRCS =	jbimain.c \
		jbistub.c \
		jbijtag.c \
		jbicomp.c \

C_OBJS = ${C_SRCS:.c=.o}

all:	jamplayer

MKDEPEND_CSRCS = ${C_SRCS}
depend:; ${MKDEPEND}

jamplayer :	${C_OBJS}
		${CC} ${LD_OPT} ${LDFLAGS} -o jamplayer ${C_OBJS} ${LLIBS}
		rootchown operator jamplayer ## rootchown root jamplayer
		rootchmod      775 jamplayer ## rootchmod 6775 jamplayer

install : all
		rootcp -p jamplayer ${IRIS_BIN}rda
		( cd ${IRIS_BIN}rda ; strip jamplayer ; \
		  rootchown operator jamplayer ; \
		  rootchmod      775 jamplayer ; \
		)
		## rootchown root jamplayer ;
		## rootchmod 6775 jamplayer ;

cleanexe:;	rm -f jamplayer core
clean:		cleanexe
		rm -f *.o
# DO NOT DELETE

jbimain.o: jbiport.h jbiexprt.h jbijtag.h jbicomp.h
jbistub.o: jbiport.h ../../include/sigtypes.h ../../include/signoarch.h
jbistub.o: ../../include/rda.h ../../include/user_lib.h jbiexprt.h
jbijtag.o: jbiport.h jbiexprt.h jbicomp.h jbijtag.h
jbicomp.o: jbiport.h jbiexprt.h jbicomp.h
