Coder Social home page Coder Social logo

make-common's Introduction

** 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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.