Especially for beginners, the findlib distribution includes a GUI to create Makefiles. As this is an optional feature, it must have been selected when findlib was built (option -with-toolbox). To invoke the GUI, run the command
$ ocamlfind findlib/make_wizard(Btw, this is the general syntax to run executables installed in package directories.) The wizard starts, and allows you to describe your project. When you save the result, not only a "Makefile" is created, but also the file ".make-wizard" containing the state. If you later start the wizard again, this file will be automatically loaded, and you can modify your definition.
The wizard consists of seven (hopefully self-explanatory) pages you can fill out. The basic idea is that the .ml, .mli, .mly, and .mll files in the current directory are compiled to a .cma or .cmxa archive, and that optionally executables are created from this archive and from additional modules (main programs). This scheme can be both used for libraries and application programs.
You can choose packages you want to use in your library or program by clicking at them in a selection box. The camlp4 syntax parsers can be optionally enabled. The modules to be compiled can be picked from the current directory, they must be selected in the right order, however.
The generated "Makefile" defines a number of logical targets (like "all", "opt", etc) that are explained at the beginning of the file. The file is fully commented, and not very difficult to understand. Only traditional Makefile syntax is used, so it is expected that it works for every version of the "make" utility.
When you build the project, the META file is created dynamically. If you do not like this, set the variable MAKE_META to the empty string. (It is a good idea to put such setting into a second file, and enter the name of this file into the box "Local extensions in" of the wizard, so you can generate the "Makefile" again without overwriting your own modifications. This second file can override the setting in the generated "Makefile".)