view Makefile @ 0:1d1b9e1b2e2f draft

Uploaded
author petr-novak
date Thu, 19 Dec 2019 10:24:45 -0500
parents
children
line wrap: on
line source

#!/bin/bash

CC=g++
CFLAGS= -ansi -O5 -Wall
LDFLAGS= -ansi -lm -Wall
EXEC=bin/louvain_community bin/louvain_convert bin/louvain_hierarchy
OBJ1= louvain/graph_binary.o louvain/community.o
OBJ2= louvain/graph.o

DNA_DB=databases/dna_database_masked.fasta.nhr
PROT_DB=re_databases/protein_database_viridiplantae_v3.0.fasta.phr
TRNA_DB=databases/tRNA_database.fasta.nhr


all: $(EXEC) $(DNA_DB) $(PROT_DB) $(TRNA_DB)

bin/louvain_community : $(OBJ1) louvain/main_community.o
	$(CC) -o $@ $^ $(LDFLAGS)

bin/louvain_convert : $(OBJ2) louvain/main_convert.o
	$(CC) -o $@ $^ $(LDFLAGS)

bin/louvain_hierarchy : louvain/main_hierarchy.o
	$(CC) -o $@ $^ $(LDFLAGS)

$(DNA_DB) : databases/dna_database_masked.fasta
	makeblastdb -in databases/dna_database_masked.fasta -out databases/dna_database_masked.fasta -dbtype nucl

$(TRNA_DB) : databases/tRNA_database.fasta
	makeblastdb -in databases/tRNA_database.fasta -out databases/tRNA_database.fasta -dbtype nucl

$(PROT_DB) : config.py
	./fetch_databases.sh

dna_database: $(DFASTA)  
##########################################
# Generic rules
##########################################

%.o: %.cpp %.h
	$(CC) -o $@ -c $< $(CFLAGS)

%.o: %.cpp
	$(CC) -o $@ -c $< $(CFLAGS)

clean:
	rm -f *.o *~ $(EXEC)