1 |
# $Id$ |
2 |
|
3 |
# Phony Targets |
4 |
# Define phony target rules which actually enact building and cleaning |
5 |
|
6 |
# These targets are phony and should always be built when requested |
7 |
.PHONY: all default clean pyc force |
8 |
|
9 |
# Make the default target if no otherwise suitable rules can be found |
10 |
.DEFAULT: default |
11 |
|
12 |
# ############################################################################# |
13 |
# If no target is specified, "all" is the first target to be found and made |
14 |
# ############################################################################# |
15 |
all: default |
16 |
|
17 |
install: all |
18 |
@echo ---------------------------------------------------------------------------- |
19 |
@if test -n "${INSTALL_PYTH}";\ |
20 |
then \ |
21 |
install -p ${INSTALL_PYTH} ${L_PYTH_DIR};\ |
22 |
fi |
23 |
@echo Installed ${INSTALL_PYTH}. |
24 |
@if test -n "${INSTALL_LIB}";\ |
25 |
then \ |
26 |
install -p ${INSTALL_LIB} ${L_INSTLIB_DIR};\ |
27 |
fi |
28 |
@echo Installed ${INSTALL_LIB}. |
29 |
@echo ---------------------------------------------------------------------------- |
30 |
|
31 |
uninstall: |
32 |
@echo ---------------------------------------------------------------------------- |
33 |
@echo Uninstalled ${INSTALL_PYTH}. |
34 |
@rm -rf ${L_PYTH_DIR}/*.py |
35 |
@rm -rf ${L_PYTH_DIR}/*.pyc |
36 |
@rm -rf ${L_INSTLIB_DIR}/*.so |
37 |
@echo Uninstalled ${INSTALL_LIB}. |
38 |
@echo ---------------------------------------------------------------------------- |
39 |
|
40 |
# Make default target and print source files that were found |
41 |
default: ${DEFAULT_TARGET} |
42 |
@if test -n "${CPP_SRC}";\ |
43 |
then\ |
44 |
echo "C++ source files: ${CPP_SRC}";\ |
45 |
fi |
46 |
@if test -n "${CC_SRC}";\ |
47 |
then\ |
48 |
echo "C source files: ${CC_SRC}";\ |
49 |
fi |
50 |
|
51 |
# Clean: remove dependency, library, object, swig and target files |
52 |
clean: |
53 |
@echo ---------------------------------------------------------------------------- |
54 |
@rm -rf ${filter-out %CVS, ${wildcard ${L_DEP_DIR}/src}} |
55 |
@rm -rf ${filter-out %CVS, ${wildcard ${L_DEP_DIR}/*.d}} |
56 |
@rm -rf ${filter-out %CVS, ${wildcard ${L_LIB_DIR}/lib*}} |
57 |
@rm -rf ${filter-out %CVS, ${wildcard ${L_OBJ_DIR}/src}} |
58 |
@rm -rf ${filter-out %CVS, ${wildcard ${L_OBJ_DIR}/*.o}} |
59 |
@rm -rf ${addprefix ${L_SRC_DIR}/, ${SWIG_CPP_SRC}} |
60 |
@rm -rf ${addprefix ${L_SRC_DIR}/, ${SWIG_PY_SRC}} |
61 |
@rm -rf ${DEFAULT_TARGET} |
62 |
@echo Cleaned. |
63 |
|
64 |
# Phony force target for targets of which remake must always happen |
65 |
force: |
66 |
|
67 |
# Python byte-code target |
68 |
pyc: ${PYTHON_BYTE} |
69 |
|
70 |
# Always remake the default target |
71 |
${DEFAULT_TARGET}: |
72 |
|