CUR_REL_PATH := base/vtv_lib

include ../../config.mk

LIB = libvtv.a
INST_INCLUDES = vtv_lib.h

OBJS =	allocate_c.o \
	colors.o \
	copying.o \
	csubs.o \
	dots.o \
	fill_region_kernel.o \
	lines_c.o \
	regions_c.o \
	text.o \
	vtv_lib_nls_init.o

PRE_CPPFLAGS += -I../include -I../user_lib
DEPS = $(patsubst %.o,%.d,$(OBJS))

all: $(LIB_DIR)/$(LIB)

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

install: all $(IRIS_INCLUDE) $(IRIS_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_LIB)

test:

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

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

$(OBJS): Makefile

-include $(DEPS)
