CUR_REL_PATH := "rda/ts/archfmt"

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

LIB = libtsarchfmt.a
INST_INCLUDES = tsarchfmt_lib.h

PRE_CPPFLAGS += -I../../include

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

all: $(LIB_DIR)/$(LIB) 

$(LIB):	$(OBJS)
	rm -f $@; $(AR) -rsc $@ $^

install: all  $(IRIS_INCLUDE) $(IRIS_TS_LIB)
	install -m 0664 -o $(IRIS_USER) -g $(IRIS_GROUP) $(INST_INCLUDES) $(IRIS_INCLUDE)
	install -m 0664 -o $(IRIS_USER) -g $(IRIS_GROUP) $(LIB) $(IRIS_TS_LIB)

test:

uninstall:
	if [ -d $(IRIS_TS_LIB) ]; then \
		cd $(IRIS_TS_LIB) && rm -f $(LIB); fi
	if [ -d $(IRIS_INCLUDE) ]; then \
		cd $(IRIS_INCLUDE) && rm -f $(INST_INCLUDES); fi

clean:
	rm -f core *.o *~ *.a *.d *.d.bak $(LIB_DIR)/$(LIB)

$(OBJS): Makefile

-include $(DEPS)
