File: quickstart.txt

package info (click to toggle)
bam 0.4.0-3
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd, wheezy
  • size: 1,416 kB
  • ctags: 2,715
  • sloc: ansic: 18,755; python: 447; cpp: 30; makefile: 11; sh: 10
file content (24 lines) | stat: -rw-r--r-- 761 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
This section is a short introduction to bam and is designed to get
you started quickly.

@GROUP Your first script @END

{{{{
1: settings = NewSettings()
2: source = Collect("src/*.c")
3: objects = Compile(settings, source)
4: exe = Link(settings, "my_app", objects)
}}}}

Line 1 creates a new settings object. This contains all the settings
on how to compile, link etc. See [NewSettings].

Line 2 gathers all the files under the src/ directory which has .c as
extention. Collect returns a table of strings which are the files.
See [Collect].

Line 3 compiles the source using the specified settings and returns a
table of the object files. See [Compile].

Line 4 links the object files to an executable named "my_app", using
the specified settings. See [Link].