Index: trunk/Ohana/src/opihi/lib.shell/Makefile
===================================================================
--- trunk/Ohana/src/opihi/lib.shell/Makefile	(revision 4746)
+++ trunk/Ohana/src/opihi/lib.shell/Makefile	(revision 4747)
@@ -5,5 +5,4 @@
 LIB     =       $(HOME)/lib
 INC     =       $(HOME)/include
-MDIR    =       $(HOME)/misc
 SDIR    =       $(HOME)/lib.shell
 #
@@ -21,5 +20,4 @@
 
 # opihi shell functions (libopihi) ########################
-
 shell = \
 $(SDIR)/ConfigInit.$(ARCH).o		\
@@ -58,64 +56,20 @@
 $(SDIR)/opihi.$(ARCH).o
 
-libshell:    $(DESTLIB)/libshell.a 
+# dependancy rules for include files ########################
+incs = \
+$(INC)/opihi.h \
+$(INC)/external.h \
+$(INC)/shell.h \
+$(INC)/dvomath.h \
+$(INC)/convert.h \
+$(INC)/display.h 
 
-$(LIB)/libshell.$(ARCH).a:   	$(shell)
-
-# dependancy rules for include files ########################
-baseinc = $(INC)/external.h $(INC)/shell.h $(INC)/dvomath.h $(INC)/convert.h $(INC)/display.h 
-
-$(shell)   	 : $(INC)/opihi.h $(baseinc)
-
-# utilities #################################################
-$(BIN)/%.$(ARCH):
-	@if [ ! -d $(BIN) ]; then mkdir -p $(BIN); fi
-	$(CC) $^ -o $@ $(LFLAGS) $(LIBS)
-	@echo "compiled $*"
-	@echo ""
-
-$(DESTBIN)/%: $(BIN)/%.$(ARCH) 
-	@if [ ! -d $(DESTBIN) ]; then mkdir -p $(DESTBIN); fi
-	rm -f $(DESTBIN)/$*
-	cp $(BIN)/$*.$(ARCH) $(DESTBIN)/$*
-	@echo "installed $*"
-	@echo ""
-
-$(LIB)/%.$(ARCH).a:
-	@if [ ! -d $(LIB) ]; then mkdir -p $(LIB); fi
-	rm -f $@
-	ar rcv $@ $^ 
-	$(RANLIB) $@
-	@echo "compiled library $*"
-	@echo ""
-
-$(DESTLIB)/%.a: $(LIB)/%.$(ARCH).a
-	@if [ ! -d $(DESTLIB) ]; then mkdir -p $(DESTLIB); fi
-	@echo ""
-	rm -f $@
-	cp $^ $@
-
-lib%.clean:
-	rm -f $(LIB)/lib$*.$(ARCH).a
-	rm -f $($*)
-	@echo ""
-
-%.clean:
-	rm -f $(BIN)/$*.$(ARCH)
-	@echo ""
-
-%.$(ARCH).o : %.c
-	$(CC) $(CFLAGS) -c $*.c -o $@
-
-clean:
-	rm -f $(BIN)/*.$(ARCH)
-	rm -f $(LIB)/*.$(ARCH).a
-	rm -f `find . -name "*.o"`
-	rm -f `find . -name "*~"`
-	rm -f `find . -name "#*"`
-
-dist: clean
-	rm -f $(BIN)/*
-	rm -f $(LIB)/*
+libshell: $(DESTLIB)/libshell.a 
+$(DESTLIB)/libshell.a: $(LIB)/libshell.$(ARCH).a
+$(LIB)/libshell.$(ARCH).a: $(shell)
+$(shell) : $(incs)
 
 uninstall:
 	rm -f $(DESTLIB)/libshell.a
+
+include ../Makefile.Common
