File: Makefile

package info (click to toggle)
glam2 1064-3
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd, stretch
  • size: 912 kB
  • ctags: 940
  • sloc: ansic: 6,925; xml: 757; asm: 74; makefile: 56
file content (69 lines) | stat: -rw-r--r-- 2,422 bytes parent folder | download | duplicates (3)
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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
# This file holds commands for compiling programs in the GLAM2 package

# These commands are customized for the gcc compiler, and may need to
# be modified for other compilers

# -Wall means turn on compiler warnings (optional)
# -O3 means optimization level 3 (the maximum for gcc)
# -lm means include the math library

# Source files for glam2:
GSRC = alphabet.c args.c column_sample.c dirichlet.c dna_prior.c	\
fasta.c glam2.c glam2_aln.c init.c output.c recode3_20comp.c		\
site_sample.c util.c

# Source files for glam2scan:
SSRC = alphabet.c scan_args.c dirichlet.c dna_prior.c fasta.c scan.c	\
scan_init.c scan_output.c recode3_20comp.c util.c heap.c motif.c	\
alignment.c

# Source files for glam2format:
FSRC = glam2format.c alignment.c fasta.c util.c

# Source files for glam2mask:
MSRC = glam2mask.c alignment.c fasta.c util.c

# Compiler options:
CFLAGS += -Wall -O3

# Default action: compile glam2, glam2scan, glam2format, and glam2mask
all: glam2 glam2scan glam2format glam2mask

# Command for compiling glam2:
glam2: $(GSRC) *.h Makefile
	cc $(CFLAGS) -o glam2 $(GSRC) -lm $(LDFLAGS)

# Command for compiling glam2scan:
glam2scan: $(SSRC) *.h Makefile
	cc $(CFLAGS) -o glam2scan $(SSRC) -lm $(LDFLAGS)

# Command for compiling glam2format:
glam2format: $(FSRC) *.h Makefile
	cc $(CFLAGS) -o glam2format $(FSRC) -lm $(LDFLAGS)

# Command for compiling glam2mask:
glam2mask: $(MSRC) *.h Makefile
	cc $(CFLAGS) -o glam2mask $(MSRC) -lm $(LDFLAGS)

# Here follow commands for compiling special versions of the programs

# Compile glam2 including FFT algorithm (requires FFTW to be installed):
glam2fft: $(GSRC) convolve.c *.h Makefile
	cc $(CFLAGS) -DFFT -o glam2fft $(GSRC) convolve.c -lm -lfftw3 $(LDFLAGS)

# Compile for debugging with gdb or valgrind, with extra compiler warnings:
glam2_d: $(GSRC) *.h Makefile
	cc -Wall -W -pedantic -g -o glam2_d $(GSRC) -lm
glam2scan_d: $(SSRC) *.h Makefile
	cc -Wall -W -pedantic -g -o glam2scan_d $(SSRC) -lm
glam2format_d: $(FSRC) *.h Makefile
	cc -Wall -W -pedantic -g -o glam2format_d $(FSRC) -lm
glam2mask_d: $(MSRC) *.h Makefile
	cc -Wall -W -pedantic -g -o glam2mask_d $(MSRC) -lm

# Compile for profiling with gprof, with extra compiler warnings:
# Use -O2 to avoid function inlining
glam2_p: $(GSRC) *.h Makefile
	cc -Wall -W -pedantic -O2 -pg -o glam2_p $(GSRC) -lm
glam2scan_p: $(SSRC) *.h Makefile
	cc -Wall -W -pedantic -O2 -pg -o glam2scan_p $(SSRC) -lm