File: Makefile

package info (click to toggle)
libpll 0.3.2-5
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 31,300 kB
  • sloc: ansic: 25,968; yacc: 691; makefile: 393; python: 295; lex: 204; sh: 52
file content (60 lines) | stat: -rw-r--r-- 1,978 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
#    Copyright (C) 2015 Diego Darriba
#
#    This program is free software: you can redistribute it and/or modify
#    it under the terms of the GNU Affero General Public License as
#    published by the Free Software Foundation, either version 3 of the
#    License, or (at your option) any later version.
#
#    This program is distributed in the hope that it will be useful,
#    but WITHOUT ANY WARRANTY; without even the implied warranty of
#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
#    GNU Affero General Public License for more details.
#
#    You should have received a copy of the GNU Affero General Public License
#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
#
#    Contact: Diego Darriba <Diego.Darriba@h-its.org>,
#    Exelixis Lab, Heidelberg Instutute for Theoretical Studies
#    Schloss-Wolfsbrunnenweg 35, D-69118 Heidelberg, Germany

CC = gcc
CFLAGS = -L. -g -O3 -Wall -std=c99
CLIBS = -lpll -lm

CFILES = $(shell find src -name '*.c' ! -name 'common.c')

OBJFILES = $(patsubst src/%.c, obj/%, $(CFILES))

OBJCOMMON = src/common.o

DATADIR = testdata
RESULTDIR = result

DEPFILES = worms16s.fas \
					 small.fas small.tree small.rooted.tree small.rooted.tip.tree \
					 246x4465.fas 246x4465.tree \
					 ribosomal_l5_pf00673.fas ribosomal_l5_pf00673.tree \
					 medium.fas medium.tree \
					 2000.fas 2000.tree \
					 200.fas 200.tree \
					 1000x5.dna.fas 1000.tree

REQFILES = $(patsubst %, $(DATADIR)/%, $(DEPFILES))
ASSETS = https://raw.githubusercontent.com/xflouris/assets/master/libpll

all: $(OBJCOMMON) $(OBJFILES) $(REQFILES)
	@mkdir -p $(RESULTDIR)

$(DATADIR)/%:
	@mkdir -p "$(@D)"
	wget -O $@ $(ASSETS)/$@

obj/%: src/%.c $(DEPS)
	@mkdir -p "$(@D)"
	$(CC) $(CPPFLAGS) $(CFLAGS) -o $@ $< $(OBJCOMMON) $(CLIBS) $(LDFLAGS) -DDATADIR=\"$(DATADIR)\"

%.o: %.c
	$(CC) $(CPPFLAGS) $(CFLAGS) -c -o $@ $< $(CLIBS) $(LDFLAGS) -DDATADIR=\"$(DATADIR)\"
	
clean:
	rm -rf obj result/* $(OBJCOMMON)