2008-01-18 01:50:35 +03:00
|
|
|
PTARG = $(ROOT)/lib/$(TARG)
|
|
|
|
LIB = $(PTARG).a
|
2010-05-23 04:55:16 +04:00
|
|
|
OFILES = $(OBJ:=.o)
|
2007-03-26 08:48:00 +04:00
|
|
|
|
2010-06-14 18:30:23 +04:00
|
|
|
all: $(HFILES) $(LIB)
|
2007-03-26 08:48:00 +04:00
|
|
|
|
2008-01-18 01:50:35 +03:00
|
|
|
install: $(PTARG).install
|
|
|
|
uninstall: $(PTARG).uninstall
|
2007-03-26 08:48:00 +04:00
|
|
|
clean: libclean
|
2010-05-23 04:55:16 +04:00
|
|
|
depend: $(OBJ:=.depend)
|
2007-03-26 08:48:00 +04:00
|
|
|
|
|
|
|
libclean:
|
2008-01-18 01:50:35 +03:00
|
|
|
for i in $(LIB) $(OFILES); do \
|
2008-01-29 01:58:23 +03:00
|
|
|
[ -e $$i ] && \
|
|
|
|
echo CLEAN $$($(CLEANNAME) $(BASE)$$i); \
|
2007-04-19 22:53:07 +04:00
|
|
|
rm -f $$i; \
|
2007-03-26 08:48:00 +04:00
|
|
|
done 2>/dev/null || true
|
|
|
|
|
|
|
|
printinstall:
|
|
|
|
echo 'Install directories:'
|
2008-01-18 01:50:35 +03:00
|
|
|
echo ' Lib: $(LIBDIR)'
|
2007-03-26 08:48:00 +04:00
|
|
|
|
2008-01-18 01:50:35 +03:00
|
|
|
$(LIB): $(OFILES)
|
|
|
|
echo AR $$($(CLEANNAME) $(BASE)/$@)
|
|
|
|
mkdir $(ROOT)/lib 2>/dev/null || true
|
|
|
|
$(AR) $@ $(OFILES)
|
|
|
|
|
|
|
|
SOMKSH=case "$(MAKESO)" in 1|[Yy][Ee][Ss]|[Tt][Rr][Uu][Ee]) echo $(ROOT)/mk/so.mk;; *) echo /dev/null;; esac
|
2010-05-23 04:55:16 +04:00
|
|
|
SOMK:=$(shell $(SOMKSH))
|
2008-01-18 01:50:35 +03:00
|
|
|
SOMK!=$(SOMKSH)
|
|
|
|
include $(SOMK)
|
2007-03-26 08:48:00 +04:00
|
|
|
|