CUR_REL_PATH := "rda/netcards_lib/tests"

include ../../../config.mk

PRE_CPPFLAGS += -I../../include  -I../../netcards_lib 
PRE_LDFLAGS += -L${SB_RDA_LIB} 

LDLIBS_test_asr_6wtx   +=  -lnetcards
LDLIBS_test_asr_rpin   +=  -lnetcards
LDLIBS_test_force_IO   +=  -lnetcards
LDLIBS_test_asr_clk    +=  -lnetcards
LDLIBS_test_asr_pulse  +=  -lnetcards
LDLIBS_test_asr_iqdata +=  -lnetcards
LDLIBS_test_asr_stc    +=  -lnetcards
LDLIBS_test_asr_stc_ll +=  -lnetcards
LDLIBS_test_asr_udp    +=  -lnetcards
LDLIBS_test_asr_brd    +=  -lnetcards
LDLIBS_test_asr_swloop +=  -lnetcards
LDLIBS_test_asr_errlog +=  -lnetcards
LDLIBS_test_asr_swloop_config +=  -lnetcards
LDLIBS_test_asr_errlog_config +=  -lnetcards
LDLIBS_test_asr_udp_rundata   +=  -lnetcards
LDLIBS_test_asr_udp_type   +=  -lnetcards
LDLIBS_test_asr_com_type   +=  -lnetcards
LDLIBS_test_asr_dvt   +=  -lnetcards
LDLIBS          += -luser -lpthread -lrt -lm

TESTS = test_asr_6wtx test_asr_rpin test_force_IO test_asr_clk test_asr_pulse test_asr_iqdata \
        test_asr_stc test_asr_udp test_asr_brd test_asr_swloop test_asr_errlog \
        test_asr_swloop_config test_asr_errlog_config test_asr_udp_rundata test_asr_udp_type \
        test_asr_com_type test_asr_dvt test_asr_stc_ll
APPS = test_asr_udp_type

OBJS = $(patsubst %,%.o,$(TESTS))
DEPS = $(patsubst %.o,%.d,$(OBJS))

test_asr_6wtx: test_asr_6wtx.o
test_asr_rpin: test_asr_rpin.o
test_force_IO: test_force_IO.o
test_asr_clk: test_asr_clk.o
test_asr_iqdata: test_asr_iqdata.o
test_asr_pulse: test_asr_pulse.o
test_asr_stc: test_asr_stc.o
test_asr_stc_ll: test_asr_stc_ll.o
test_asr_udp: test_asr_udp.o
test_asr_brd: test_asr_brd.o
test_asr_swloop: test_asr_swloop.o
test_asr_errlog: test_asr_errlog.o
test_asr_swloop_config: test_asr_swloop_config.o
test_asr_errlog_config: test_asr_errlog_config.o
test_asr_udp_rundata: test_asr_udp_rundata.o
test_asr_udp_type: test_asr_udp_type.o
test_asr_com_type: test_asr_com_type.o
test_asr_dvt: test_asr_dvt.o

all: $(APPS)

clean:
	rm -f core *.o *~ *.d $(TESTS)

install: all 
	install -m 0775 -o $(IRIS_USER) -g $(IRIS_GROUP) $(STRIP_OPT) $(APPS) $(IRIS_BIN)

test:

uninstall:
	if [ -d $(IRIS_BIN) ]; then \
		cd $(IRIS_BIN) && rm -f $(APPS) ; fi

$(OBJS): Makefile

-include $(DEPS)
