]> git.donarmstrong.com Git - bamtools.git/blob - Makefile
Merge branch 'master' of http://github.com/pezmaster31/bamtools
[bamtools.git] / Makefile
1 # ==========================
2 # BamTools Makefile
3 # (c) 2010 Derek Barnett
4 #
5 # top-level
6 # ==========================
7
8 # define main directories
9 export OBJ_DIR  = obj
10 export BIN_DIR  = bin
11 export SRC_DIR  = src
12
13 # define compile/link flags
14 export CXX      = g++\r
15 export CXXFLAGS = -Wall -O3 -D_FILE_OFFSET_BITS=64
16 export LIBS     = -lz
17
18 # define current BamTools version
19 export BAMTOOLS_VERSION = 0.7.0812
20
21 # define source subdirectories
22 SUBDIRS = $(SRC_DIR)/api \
23           $(SRC_DIR)/utils \
24           $(SRC_DIR)/third_party \
25           $(SRC_DIR)/toolkit 
26
27 all:
28         @echo "Building BamTools:"
29         @echo "Version: $$BAMTOOLS_VERSION"
30         @echo "========================================================="
31         @echo ""
32         @echo "- Creating target directories"
33         @mkdir -p $(BIN_DIR)
34         @mkdir -p $(OBJ_DIR)
35         @echo ""
36         @for dir in $(SUBDIRS); do \
37                 echo "- Building in $$dir"; \
38                 $(MAKE) --no-print-directory -C $$dir; \
39                 echo ""; \
40         done
41
42 .PHONY: all
43
44 clean:
45         @echo "Cleaning up."
46         @rm -f $(OBJ_DIR)/* $(BIN_DIR)/*
47
48 .PHONY: clean