apw | 3812c03 | 2006-12-07 21:01:14 +0000 | [diff] [blame^] | 1 | # (C) Copyright IBM Corp. 2004, 2005, 2006 |
| 2 | # Author: Andy Whitcroft <andyw@uk.ibm.com> |
| 3 | # |
| 4 | # The Console Multiplexor is released under the GNU Public License V2 |
| 5 | BUILD= |
| 6 | PREFIX=/usr/local/conmux |
| 7 | BASE=$(BUILD)$(PREFIX) |
| 8 | BINS=console conmux-attach |
| 9 | LIBS=Conmux.pm |
| 10 | SBIN=conmux-registry conmux start |
| 11 | |
| 12 | MODULES=helpers drivers |
| 13 | |
| 14 | all:: |
| 15 | |
| 16 | install:: |
| 17 | @[ -d $(BASE) ] || mkdir -p $(BASE) |
| 18 | @[ -d $(BASE)/bin ] || mkdir $(BASE)/bin |
| 19 | @[ -d $(BASE)/lib ] || mkdir $(BASE)/lib |
| 20 | @[ -d $(BASE)/sbin ] || mkdir $(BASE)/sbin |
| 21 | @[ -d $(BASE)/log ] || mkdir $(BASE)/log |
| 22 | @[ -d $(BASE)/etc ] || mkdir $(BASE)/etc |
| 23 | for f in $(BINS); do \ |
| 24 | rm -f $(BASE)/bin/$$f; \ |
| 25 | cp -p $$f $(BASE)/bin/$$f; \ |
| 26 | chmod 755 $(BASE)/bin/$$f; \ |
| 27 | done |
| 28 | for f in $(SBIN); do \ |
| 29 | rm -f $(BASE)/sbin/$$f; \ |
| 30 | cp -p $$f $(BASE)/sbin/$$f; \ |
| 31 | chmod 755 $(BASE)/sbin/$$f; \ |
| 32 | done |
| 33 | for f in $(LIBS); do \ |
| 34 | rm -f $(BASE)/lib/$$f; \ |
| 35 | cp -p $$f $(BASE)/lib/$$f; \ |
| 36 | chmod 644 $(BASE)/lib/$$f; \ |
| 37 | done |
| 38 | |
| 39 | release:: |
| 40 | $(MAKE) BUILD=build install |
| 41 | (cd build; tar cf - *) | gzip >conmux.tgz |
| 42 | rm -rf build |
| 43 | |
| 44 | clean:: |
| 45 | rm -f conmux.tgz |
| 46 | |
| 47 | include $(patsubst %, %/module.mk, $(MODULES)) |