summaryrefslogtreecommitdiff
path: root/README.md
blob: 43fad4fe9544db050c3125dde2e2f84e26f68364 (plain)
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
29
30
31
32
33
34
Maje
====

Maje is a simple utility to generate basic Makefiles for simple utilities. Maje
scans a directory tree for C source code, and builds a Makefile with proper
dependency information based on that code. The Makefile in this source tree
is itself generated by Maje.

There are a few restrictions:

- Source files must be named ending with .c.

- Only executables are supported, not libraries (there must be a main()).

- Only one executable per source tree is supported (exactly one main()).

- Maje expects the resulting binary to have the same base name as the source
file containing main() (e.g. if main() is in maje.c, the binary will be called
maje).

Usage
=====

Run Maje with:

    maje [-n] [dir]

By default, Maje will execute `make` when it is done creating the Makefile. Use
the `-n` option to prevent this.

By default, Maje generates a Makefile for sources in the current directory.
You can specify a directory as a command line parameter to generate a Makefile
to build binaries in a separate directory from the source. Maje will always
build Makefiles and binaries in the current directory.