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