Makefile 1.8 KB
Newer Older
1
2
3
4
5
6
# ==========================
# BEDTools Makefile
# (c) 2009 Aaron Quinlan
# ==========================

# define our object and binary directories
Aaron's avatar
Aaron committed
7
8
9
10
export OBJ_DIR	= obj
export BIN_DIR	= bin
export SRC_DIR	= src
export CXX		= g++
Aaron's avatar
Aaron committed
11
export CXXFLAGS = -Wall -O2
Aaron's avatar
Aaron committed
12
export LIBS		= -lz
13

14
15


Aaron's avatar
Aaron committed
16
SUBDIRS = $(SRC_DIR)/annotateBed \
Aaron's avatar
Aaron committed
17
18
19
20
21
22
23
24
		  $(SRC_DIR)/bamToBed \
		  $(SRC_DIR)/bedToBam \
		  $(SRC_DIR)/bedToIgv \
		  $(SRC_DIR)/bed12ToBed6 \
		  $(SRC_DIR)/closestBed \
		  $(SRC_DIR)/complementBed \
		  $(SRC_DIR)/coverageBed \
		  $(SRC_DIR)/fastaFromBed \
25
		  $(SRC_DIR)/fjoin \
Aaron's avatar
Aaron committed
26
27
28
29
30
31
32
33
34
35
36
37
38
39
		  $(SRC_DIR)/genomeCoverageBed \
		  $(SRC_DIR)/intersectBed \
		  $(SRC_DIR)/linksBed \
		  $(SRC_DIR)/maskFastaFromBed \
		  $(SRC_DIR)/mergeBed	\
		  $(SRC_DIR)/overlap \
		  $(SRC_DIR)/pairToBed \
		  $(SRC_DIR)/pairToPair \
		  $(SRC_DIR)/shuffleBed \
		  $(SRC_DIR)/slopBed \
		  $(SRC_DIR)/sortBed \
		  $(SRC_DIR)/subtractBed \
		  $(SRC_DIR)/unionBedGraphs \
		  $(SRC_DIR)/windowBed
40

Aaron's avatar
Aaron committed
41
42
43
44
45
46
47
48
49
50
UTIL_SUBDIRS =	$(SRC_DIR)/utils/lineFileUtilities \
				$(SRC_DIR)/utils/bedFile \
				$(SRC_DIR)/utils/bedGraphFile \
				$(SRC_DIR)/utils/tabFile \
				$(SRC_DIR)/utils/genomeFile \
				$(SRC_DIR)/utils/gzstream \
				$(SRC_DIR)/utils/fileType \
				$(SRC_DIR)/utils/bedFilePE \
				$(SRC_DIR)/utils/sequenceUtilities \
				$(SRC_DIR)/utils/BamTools
51

52
all:
Aaron's avatar
Aaron committed
53
54
55
56
57
58
59
60
61
62
63
	[ -d $(OBJ_DIR) ] || mkdir -p $(OBJ_DIR)
	[ -d $(BIN_DIR) ] || mkdir -p $(BIN_DIR)
	
	@echo "Building BEDTools:"
	@echo "========================================================="
	
	@for dir in $(UTIL_SUBDIRS); do \
		echo "- Building in $$dir"; \
		$(MAKE) --no-print-directory -C $$dir; \
		echo ""; \
	done
64

Aaron's avatar
Aaron committed
65
66
67
68
69
	@for dir in $(SUBDIRS); do \
		echo "- Building in $$dir"; \
		$(MAKE) --no-print-directory -C $$dir; \
		echo ""; \
	done
70

71

72
73
74
.PHONY: all

clean:
Aaron's avatar
Aaron committed
75
76
	@echo "Cleaning up."
	@rm -f $(OBJ_DIR)/* $(BIN_DIR)/*
77
78

.PHONY: clean