# Extended Module player lib/Makefile

DFILES	= Makefile
CFILES	= libxmp.a
DCFILES	=
MYLIB	= libxmp.a
MYSHLIB	= $(MYLIB:.a=.so)

all: $(MYLIB)

$(MYLIB):
	$(MAKE) -C ../src

install::

shared: $(MYLIB)
	rm -f $(MYSHLIB)* *.o
	$(AR) xv $(MYLIB)
	gcc -shared -o $(MYSHLIB).$(VERSION) *.o
	rm -f *.o
	ln -s $(MYSHLIB).$(VERSION) $(MYSHLIB)
	
static_install:
	@echo Installing libraries in $(LIB_DIR)...
	@[ -d $(LIB_DIR) ] || mkdir -p $(LIB_DIR)
	$(INSTALL) -m755 $(MYLIB) $(LIB_DIR)
	$(STRIP) -g $(LIB_DIR)/$(MYLIB)

include ../Makefile.rules

