#
# Makefile for NORDRAD UNIX API interface
#
#
CUR_REL_PATH := libs/nordrad

include ../../config.mk

LIB = libnordrad.a

DEFINES = -D_BSD -DNOSERVER -DNOTIMERS

CFLAGS= ${DEBUGFLAG} ${C_OPT} -D${MACH_OS} ${DEFINES}

NRD_SRCS = comp.c fil.c netcom.c nradapi.c nradutil.c

NRD_OBJS = ${NRD_SRCS:.c=.o}

MKDEPEND_CSRCS = ${NRD_SRCS}

all: ${LIB_DIR} ${LIB_DIR}/${LIB}

depend: makefile.d

makefile.d: ${MKDEPEND_CSRCS}
	touch makefile.d
	makedepend -fmakefile.d -- ${CFLAGS} -- ${MKDEPEND_CSRCS}

cleanexe:

clean: cleanexe
	rm -f *.o *~ *.a *.d *.d.bak ${LIB_DIR}/${LIB}

install: all ${IRIS_LIB}
	install -m 0664 -o ${IRIS_USER} -g ${IRIS_GROUP} ${LIB} ${IRIS_LIB}

uninstall:
	cd ${IRIS_LIB}; rm -f ${LIB}

install_src: ${INST_SRC_DIR}
	install -m 0664 -o ${IRIS_USER} -g ${IRIS_GROUP} Makefile *.[cCh] ${INST_SRC_DIR}

uninstall_src:
	rm -rf ${INST_SRC_DIR}

${LIB}: ${NRD_OBJS}
	rm -f $@; $(AR) -rsc $@ $^

-include makefile.d
