1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28
|
#
# 1) Compiling
# Type make in this directory
#
# 2) Installation
# Edit the BINDIR and MODDIR below as necessary or pass the PREFIX variable
# to the make command. When not set, the programs will be placed in "bin"
# and "lib" subdirectories in this directory.
# PREFIX="/install/to/path/prefix" make install
#
# Add the MODDIR to your PERL5LIB environment variable:
# export PERL5LIB=${PREFIX}/lib:${PERL5LIB}
#
ifndef PREFIX
export PREFIX = $(dir $(realpath $(lastword $(MAKEFILE_LIST))))
endif
export BINDIR = ${PREFIX}/bin
export MODDIR = ${PREFIX}/lib/perl5/site_perl
DIRS = cpp perl
install:
@mkdir -p $(BINDIR); mkdir -p $(MODDIR); \
for dir in $(DIRS); do cd $$dir && $(MAKE) && cd ..; done
clean:
@for dir in $(DIRS); do cd $$dir && $(MAKE) clean && cd ..; done
|