** README for make-common **
* OVERVIEW *
make-common is a makefile (common.1.mk) to be included in the primary Makefiles
for other projects. It provides some common functionality and a uses a common
set of variables.
It will automatically generate dependency information for C and C++.
It provides a default set of variables and will try to guess the correct
directories for source, building, binaries and libraries.
It provides default rules for building C, C++, Objective-C, and Fortran that
will use the right directories for source, includes, binaries, and libraries.
See the various examples for how to use the common makefile.
The main targets make-common provides are:
- `make env': lists the variables set in the makefile
- `make dist': Creates a distribution tarball for the package (figuring out the distfiles from svn list)
- `make deb': Creates deb package
- `make debinstall': Creates and installs deb package
Additionally, there is another makefile, common-3auto.mk, for makeing debs from
3rdparty autotools packages. Look at the example at the top of that file to see how it works.
* FUNCTION LIST *
LINKLIB(name_of_binary, object files, shared libs, static libs)
ie, $(call LINKBIN frob, foo.o, bar, bif)
LINKBIN(name_of_binary, object files, shared libs, static libs)
ie, $(call LINKBIN frob, foo.o, bar, bif)
* VARIABLE LIST *
# Project Name
PROJECT
# Project Version
VERSION
# Binary Files
BINFILES
# Library files
LIBFILES
# Files to tar up for distribution
DISTFILES
# Path to copy distribution tarball
DISTPATH
## The following should be set in your shell init scripts
# host:path to ssh/rsync doxygen html docs to
DOXRSYNCSSH
# Local path to copy HTML Doxygen documentation
DOXPATH
# host:dir to scp distribution tarball to
DISTSCPPATH
## The following have sane defaults
# C Compiler
cc
# C++ Compiler
CC
# Fortran 95 Compiler
f95
# Objective C Compiler
objcc
# Static Libary Linker
ar
# Linker
ld
# Directory for headers
INCLUDEDIR
# Directory for source files
SRCDIR
# Directory to put object files
BUILDDIR
# Directory to put library files
LIBDIR
# Directory to put binaries
BINDIR
# Libarary directories to include
LIBDIRS
# Installation prefix
PREFIX
# C Compiler Flags
CFLAGS
# C++ Compiler Flags
CPPFLAGS
# Objective-C Compiler Flags
OBJCFLAGS
# Fortran Compiler Flags
FFLAGS
# Linker Flags
LDFLAGS
# default source files
SRCFILES
# Directory to install verbatim (symlinks are dereferenced)
VERBATIMDIR := verbatim
# Directory to put dependency information
DEPDIR
# Directory to put deb package
DEBDISTDIR
# dpkg control file
DEBCONTROL
# deb package version nummber
DEBPKGVERSION
# Prefix under / to install the files for the deb
DEBPREFIX