File: README.md

package info (click to toggle)
bart 0.9.00-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 9,040 kB
  • sloc: ansic: 116,116; python: 1,329; sh: 726; makefile: 639; javascript: 589; cpp: 106
file content (52 lines) | stat: -rw-r--r-- 981 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
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
### Custom Makefiles
Put custom Makefiles here, to be included in the standard Makefile.
The build will automatically include the following files in this directory
matching the expansion `Makefile.*`

Example custom Makefile for modifying build:

```bash
## Makefile.local
# Makefile for my local build

DEBUG = 1

# Parallel make
PARALLEL ?= 1

# GPU
CUDA=0

CC=clang
OMP=0

# Paths
FFTW_BASE := /opt/local/
MATLAB_BASE := /Applications/MATLAB_R2016a.app
CUDA_BASE = /usr/local/cuda/
BLAS_BASE := /opt/local
```

Example Makefile and library rules for adding a custom program:

```bash
## Makefiles/Makefile.sum
# Compile my custom program, src/sum.c, which relies on
# my custom library, lib/libsum.a

MODULES_sum = -lsum
MODULES_bart += -lsum
XTARGETS += sum
```

```bash
### rules/sum.mk
# Build my custom library with files under src/sum/

sumsrcs := $(wildcard $(srcdir)/sum/*.c)
sumobjs := $(sumsrcs:.c=.o)

.INTERMEDIATE: $(sumobjs)

lib/libsum.a: libsum.a($(sumobjs))
```