Menu

Tree [96ff66] default tip /
 History

Read Only access


File Date Author Commit
 docs 2009-12-12 Michal Wojcikowski Michal Wojcikowski [5f7f10] added kLibsAllStatic option - allow to link sta...
 examples 2009-12-12 Michal Wojcikowski Michal Wojcikowski [410dae] example : 02.complex : fixed makefile
 kpmake 2009-12-12 Michal Wojcikowski Michal Wojcikowski [96ff66] pkg-deps : exiting immediately when pkg-config ...
 scripts 2009-12-12 Michal Wojcikowski Michal Wojcikowski [6eeb67] log : some more fixes
 COPYING 2009-09-20 Michal Wojcikowski Michal Wojcikowski [6fb532] Added documentation.
 Makefile 2009-11-15 Michal Wojcikowski Michal Wojcikowski [0c3179] installing products : now checks if installed v...
 README 2009-09-20 Michal Wojcikowski Michal Wojcikowski [6fb532] Added documentation.
 TODO 2009-10-25 Michal Wojcikowski Michal Wojcikowski [77c00f] docs : described custom exec
 version 2009-11-21 Michal Wojcikowski Michal Wojcikowski [cfb8c1] VERSION 0.9.8

Read Me

Kelpie Makefiles.
Generic makefiles for C/C++ projects.

Author: Michal Wojcikowski <deffer44@gmail.com>
Licence: LGPL

http://sourceforge.net/projects/kelpiemake/

------------------------------------------------------

0. For impatient users
======================

There are short examples, see "examples" directory.

1. Quick installation
=====================

Wheater you're installing Kelpie, or you're using it already, there is one
thing in common - you need to define a few environment variables to make it
work in your environment.

But if you accept defaults (/usr/local/lib, etc), when you only want to
compile for your own host, and install to system directories - you can provide
no customization at all - and you can skip the next parts about normal/full
installation.

In any way, when compiling ANY project of your own, wheater you'd be using
Kelpie, other makefile set, or rolling out your own, I'd STRONGLY recommend
going with non-root compilation and installation - that means installing NOT
to /usr/..., but to some directory in your $HOME, that you can easily delete
whenever you feel like it.

In all cases, installation is being made with:
> [sudo] make install

2. Basic installation
======================

Cross compilation, or installation on non-root environment will require just
a bit of information to be passed to Kelpie.

"CROSS_ROOT" variable is needed to install Kelpie makefiles.

"kpToolsRoot" variable should be set, but it can also be taken from
customization sub-makefile (see: 5. Customizations). It allows to correctly
install helper scripts that are used by Kelpie.

3. Full installation
====================

You need to provide a sub-makefile, that Kelpie will be including.
The file name and location should be:
$(CROSS_ROOT)/usr/local/include/kpmake/external.mk
You can put all the necessary configuration in that file (see docs/ directory
for what can be configured).

Installation Makefile will use this sub-makefile, and might find out the value
of "kpToolsRoot" that way.

4. Basic usage
==============

When compiling a library or an executable, you need to write your own, short
makefile, set a few variables, and include "kpmake/inc.mk". A standard set of
needed variables is decribed below.

"CROSS_ROOT" variable is needed as before. "TARGET_ROOT" and "kpToolsRoot"
variables may be set. Each one defaults to $(CROSS_ROOT). For more info, see
"docs/kelpieMake-root.txt".

Next, you need to specify what you want to build
(see: docs/kelpieMake-products.txt).

Next, you need to specify where are the sources and headers. For headers, you
can also specify the exact root path, from which the installation should start
recursively (see: docs/kelpieMake-sources.txt).

Next, dependencies are to be specified, direct libraries (-lsomething) and
pkg-config dependencies.

At the end, you need to include kpmake/inc.mk file:
+ include $(CROSS_ROOT)/usr/local/include/kpmake/inc.mk

After that, you might add anything you want, but some things, like sources,
headers, products, adding new targets (see: docs/kelpieMake-targets.txt),
modifying flags, and the like, you won't be able to change after inclusion
of "inc.mk", so it's safer to specify them at the beginning.

5. Customizations in "external.mk"
==================================

This file should provide adaption from you environment/toolchain/etc. to
variables understood by Kelpie, so that you won't have to specify them in
all the makefiles in each of your library/executable.

Most common things are:
+ CROSS_ROOT
+ TARGET_ROOT
+ kpToolsRoot
+ kpTmpDir
+ kpProductsDir
You might add some commonly used CPPFLAGS/CFLAGS/CXXFLAGS/LDFLAGS here.

Any other things (e.g. some extra targets) are also allowed, of course.

6. Tips
=======

See "examples" directory for simple to advanced usage.
For reference, see "docs" directory.
If you're having any problems, write to the author :)

Thanks
-deffer
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.