Provides a template makefile for add quickly a build sytem for your project
CSS JavaScript
Switch branches/tags
Nothing to show
Latest commit aa35811 Apr 19, 2016 @bioinfornatics Merge pull request #2 from dsboger/master
Add support for DESTDIR in Makefile_exe
Permalink
Failed to load latest commit information.
ddoc
LICENSE licensed to public domain Dec 10, 2011
Makefile_exe Add support for DESTDIR in Makefile_exe Apr 18, 2016
Makefile_lib Auto add path to import from var ROOT_SOURCE_DIR Aug 16, 2012
README README Aug 10, 2012
command.make Add Cygwin support Sep 28, 2012
cutedoc.ddoc Able to build as cute doc Mar 21, 2012

README

============
MakefileForD
============

This project provides a template build system for use D project
Makefile_lib  -> library
Makfile_exe   -> executable could to be renamed

Rename Makefile_lib/Makefile_exe to Makefile
In all case you need add command.make in same directory


What you need to do:
--------------------
 - take Makefile and command.make
 - put it at root of your project
 - set variables into Makefile: PROJECT_NAME, AUTHOR, DESCRIPTION, VERSION, LICENSE, SOURCES or ROOT_SOURCE_DIR

It is recommended to put your sources files into a src dir and set var ROOT_SOURCE_DIR to src. Build systeme will found
automatically sources files to build.

Tips:
-----
when you need to write a path like for set SOURCES var use $(PATH_SEP) instead / or \ this allow support both windows and *NIX
 
How build your project:
-----------------------
In same directory where is the file Makefile do:
 $ make
 $ make install
 
Use -j flag for multithreading:
 $ make -j
 $ make install -j
 
You can override many varibale as prefix or libdir:
 $ make 
 $ make install PREFIX=/usr LIB_DIR=/usr/lib64
 
Set DFLAGS
 $ make DFLAGS="-w -d -g -O"
 
Set Include flag
 DFLAGS_IMPORT="-Idir1 -Idir2"
  
Set compiler
 $ make DC=dmd

Generate tag for geany
 $ make geany-tag
 
Generate pkgconfig file
 $ make pkgfile

Generate Ddoc
 You need wrote in root dir a modules.ddoc file, afeter this do
 $ make ddoc

Generate shared lib:
 $ make shared-lib

Combine targets together:
$ make -j all shared-lib  ddoc DFLAGS_IMPORT="-ImySourceDir"

Default target:
 all: able to build static lib, doc, header, pkg-confih file

Others targets:
- shared-lib
- ddoc
- geany-tag

How Clean your project:
-----------------------
Each build targets has a clean target by example if you have built with "shared-lib" target use "clean-shared-lib" target

How Install your project:
-------------------------:
Each build targets has a install target by example if you have builti with "shared-lib" target use "install-shared-lib" target

RESUME:
-------

BUILD       | CLEAN            | INSTALL
___________________________________________________
all         | clean            | install
static-libs | clean-static-lib | install-static-lib
shared-lib  | clean-shared-lib | install-shared-lib
header      | clean-header     | install-header
doc         | clean-doc        | install-doc
ddoc        | clean-ddoc       | install-ddoc
geany-tag   | clean-geany-tag  | install-geany-tag
pkgfile     | clean-pkgfile    | install-pkgfile


Feature:
--------
- Support 3 compilers: ldc, gdc, dmd
- Build as static lib or shared
- Generate geany tag
- Generate package config file
- Generate both normal doc and cute doc

TODO:
-----
- Add Windows support (should work)