# # This is a standard Makefile for small programs used by many programs # in the 'smallstuff' directory. # PROGRAM= PREFIX_OSI=$(HOME)/opt/OSI/$(notdir $(shell pwd)) MATRIX_CMD=$(HOME)/dev/svnwcs/smallstuff/matrix/bin/matrix PREFIX_OS=$(HOME)/opt/$(shell matrix --os)/$(notdir $(shell pwd)) INSTALL_CMD=/usr/bin/install INSTALL_FLAGS=-D -v all: compile install: @find * -type f | egrep -v 'Makefile|\.svn|\.c$$' | while read FILE; do \ case `file "$$FILE"` in \ *ELF*) $(INSTALL_CMD) $(INSTALL_FLAGS) "$$FILE" $(PREFIX_OS)/"$$FILE" ;; \ *) $(INSTALL_CMD) $(INSTALL_FLAGS) "$$FILE" $(PREFIX_OSI)/"$$FILE" ;; \ esac; \ done compile: find . -name '*.c' | while read CFILE; do \ $(MAKE) bin/$(notdir $(shell pwd)); \ done