| 1 |
# common switch make |
| 2 |
|
| 3 |
ASLTS_VER ?= 00000000 |
| 4 |
|
| 5 |
all: ${MDIRS} |
| 6 |
${MDIRS}: FORCE |
| 7 |
@cd $@; pwd; make |
| 8 |
|
| 9 |
install: FORCE |
| 10 |
@r=0; set -e; for d in ${MDIRS}; do \ |
| 11 |
(cd $$d; \ |
| 12 |
if [ $$? -ne 0 ]; then \ |
| 13 |
echo "Bad element of MDIRS: <$$d>"; \ |
| 14 |
else \ |
| 15 |
pwd; \ |
| 16 |
>&2 echo "Begin compiling test package: [$$d]"; \ |
| 17 |
$(MAKE) install ASLTS_MODE=$(ASLTS_MODE) ASLTS_VER=$(ASLTS_VER); \ |
| 18 |
if [ $$? -ne 0 ]; then \ |
| 19 |
r=1; \ |
| 20 |
false; \ |
| 21 |
fi; \ |
| 22 |
fi); \ |
| 23 |
if [ $$r -ne 0 ]; then \ |
| 24 |
exit $r; \ |
| 25 |
fi; \ |
| 26 |
>&2 echo "Compiled test package: [$$d]"; \ |
| 27 |
done |
| 28 |
|
| 29 |
install_n32: |
| 30 |
$(MAKE) install ASLTS_MODE=n32 ASLTS_VER=$(ASLTS_VER) |
| 31 |
install_n64: |
| 32 |
$(MAKE) install ASLTS_MODE=n64 ASLTS_VER=$(ASLTS_VER) |
| 33 |
install_o32: |
| 34 |
$(MAKE) install ASLTS_MODE=o32 ASLTS_VER=$(ASLTS_VER) |
| 35 |
install_o64: |
| 36 |
$(MAKE) install ASLTS_MODE=o64 ASLTS_VER=$(ASLTS_VER) |
| 37 |
install_aslminus: |
| 38 |
$(MAKE) install ASLTS_MODE=aslminus ASLTS_VER=$(ASLTS_VER) |
| 39 |
install_aslplus: |
| 40 |
$(MAKE) install ASLTS_MODE=aslplus ASLTS_VER=$(ASLTS_VER) |
| 41 |
install_aslconvert: |
| 42 |
$(MAKE) install ASLTS_MODE=aslconvert ASLTS_VER=$(ASLTS_VER) |
| 43 |
|
| 44 |
install_all: install_n32 install_n64 install_o32 install_o64 install_aslminus install_aslplus install_aslconvert |
| 45 |
|
| 46 |
clean: FORCE |
| 47 |
@for d in ${MDIRS}; do \ |
| 48 |
(cd $$d; \ |
| 49 |
if [ $$? -ne 0 ]; then \ |
| 50 |
echo "Bad element of MDIRS: <$$d>"; \ |
| 51 |
else \ |
| 52 |
pwd; make clean; \ |
| 53 |
fi); \ |
| 54 |
done |
| 55 |
|
| 56 |
clobber: FORCE |
| 57 |
@for d in ${MDIRS}; do \ |
| 58 |
(cd $$d; \ |
| 59 |
if [ $$? -ne 0 ]; then \ |
| 60 |
echo "Bad element of MDIRS: <$$d>"; \ |
| 61 |
else \ |
| 62 |
pwd; make clobber; \ |
| 63 |
fi); \ |
| 64 |
done |
| 65 |
|
| 66 |
FORCE: |