wmii

git clone git://oldgit.suckless.org/wmii/
Log | Files | Refs | README | LICENSE

lib.mk (683B)


      1 PTARG = $(ROOT)/lib/$(TARG)
      2 LIB = $(PTARG).a
      3 OFILES = $(OBJ:=.o)
      4 
      5 all: $(HFILES) $(LIB)
      6 
      7 install: $(PTARG).install
      8 uninstall: $(PTARG).uninstall
      9 clean: libclean
     10 depend: $(OBJ:=.depend)
     11 
     12 libclean:
     13 	for i in $(LIB) $(OFILES); do \
     14 		[ -e $$i ] && \
     15 		echo CLEAN $$($(CLEANNAME) $(BASE)$$i); \
     16 		rm -f $$i; \
     17 	done 2>/dev/null || true
     18 
     19 printinstall:
     20 	echo 'Install directories:'
     21 	echo '	Lib: $(LIBDIR)'
     22 
     23 $(LIB): $(OFILES)
     24 	echo AR $$($(CLEANNAME) $(BASE)/$@)
     25 	mkdir $(ROOT)/lib 2>/dev/null || true
     26 	$(AR) $@ $(OFILES)
     27 
     28 SOMKSH=case "$(MAKESO)" in 1|[Yy][Ee][Ss]|[Tt][Rr][Uu][Ee]) echo $(ROOT)/mk/so.mk;; *) echo /dev/null;; esac
     29 SOMK:=$(shell $(SOMKSH))
     30 SOMK!=$(SOMKSH)
     31 include $(SOMK)
     32