2 ======================================================================
4 Simple! You just do 'make' to build all the erlang programs.
6 If you want, you can add the bin/ directory to your $PATH, and use the
7 useful programs in there. One is 'jerl', a simple wrapper around 'erl'
8 that adds all the Jungerl applications to the code path.
10 If a program is giving you trouble, just put an empty file called SKIP
11 in its top-level directory. For example, if you want to skip the
12 'tuntap' program, you can do: touch lib/tuntap/SKIP
14 If you want to compile only one program or library, you can just do 'make conf'
15 and then type make in the lib/PROGRAMNAME directory of your choice.
17 How to add an application to the Jungerl
18 ======================================================================
20 Each application has its own directory called lib/<appname>.
22 The absolute minimum requirement for an application is to have a
23 Makefile in the lib/<appname> directory with two targets:
25 'all' should build the program.
27 'clean' should delete any object files.
29 Realistically, your lib/<appname>/ dir should also have any of these
30 subdirectories that are appropriate:
32 src/ containing erlang sources
34 ebin/ for putting compiled beam files
36 c_src/ containing C sources
38 priv/ containing files you want at runtime (e.g. built from c_src)
40 doc/ (not sure what this is for..)
42 Once you have created your application, you should edit the 'lib/'
43 directory Makefile like this:
45 Add your <appname> to the "LIBS" variable.
47 If you depend on other applications, add a line that says so. (These
48 are down near the bottom.)
50 Note that Applications in the Jungerl should be compatible with the
51 latest released version of Erlang/OTP!
55 ----------------------------------------------------------------------
57 The support/ directory contains a couple of useful include files for
60 subdirs.mk: Intended for your lib/<appname>/ directory, this defines
61 targets for 'all' and 'clean' that just cd into $(SUBDIRS) (by
62 default c_src and src) and does the same "make" in each of them.
64 include.mk: This defines a bunch of useful things for building C and
65 Erlang programs. For C it has 'configure'-detected CC and CFLAGS
66 variables, and ERL_C_INCLUDE_DIR for
67 <prefix>/lib/erlang/usr/include/ (e.g. for writing drivers)
69 For Erlang it has a 'configure'-detected ERLC, an
70 automatically-detected list of beam files to build (../ebin/*.beam
71 for all *.erl files) called ERL_OBJECTS, and
72 automatically-detected list of headers they depend on (*.hrl and
73 ../include/*.hrl) called ERL_HEADERS, and an implicit rule for
74 building ../ebin/*.beam from *.erl.
76 That probably wasn't very clear, but if you look at how the 'tuntap'
77 program's Makefiles are done then it should be obvious!