CUR_REL_PATH := "iris/dmrl_pipe"

include ../shared/config.mk

PRE_CPPFLAGS += -I../pipesup_lib

LDLIBS += -luser -lm -lmisc -ldspi -lhimath -lsiglog -lpipesup -lboost_system
LDLIBS_DMRLToIris = -lmisc -ldspi -lhimath -lpopt -lz

TEMPL_PIPES_DIR = $(IRIS_ROOT)/config_template/pipes

OBJS = DMRLToIris.o \
       DMRLParse.o


PIPES = DMRLToIris
CONFS = DMRLToIris.conf

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

LINK.o = $(LINK.C)

all: $(EXES) $(PIPES)

DMRLToIris:	DMRLToIris.o DMRLParse.o

install: all $(IRIS_BIN) $(IRIS_PIPES) $(IRIS_PIPES_TMPL) $(IRIS_CONFIG_TMPL)
	install -m 0775 -o $(IRIS_USER) -g $(IRIS_GROUP) -s $(PIPES) $(IRIS_PIPES)
	install -m 0775 -o $(IRIS_USER) -g $(IRIS_GROUP) -s $(PIPES) $(IRIS_PIPES_TMPL)
	install -m 0664 -o $(IRIS_USER) -g $(IRIS_GROUP)    $(CONFS) $(IRIS_CONFIG_TMPL)

uninstall:
	if [ -d $(IRIS_PIPES)       ]; then cd $(IRIS_PIPES)       && rm -f $(PIPES); fi
	if [ -d $(IRIS_PIPES_TMPL)  ]; then cd $(IRIS_PIPES_TMPL)  && rm -f $(PIPES); fi
	if [ -d $(IRIS_CONFIG_TMPL) ]; then cd $(IRIS_CONFIG_TMPL) && rm -f $(CONFS); fi

test:

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

$(OBJS): Makefile

-include $(DEPS)
