0
|
1 UTILITIES_DIR = ../utils/
|
|
2 OBJ_DIR = ../../obj/
|
|
3 BIN_DIR = ../../bin/
|
|
4
|
|
5 # -------------------
|
|
6 # define our includes
|
|
7 # -------------------
|
|
8 INCLUDES = -I$(UTILITIES_DIR)/bedFile/ \
|
|
9 -I$(UTILITIES_DIR)/version/ \
|
|
10 -I$(UTILITIES_DIR)/gzstream/ \
|
|
11 -I$(UTILITIES_DIR)/genomeFile/ \
|
|
12 -I$(UTILITIES_DIR)/lineFileUtilities/ \
|
|
13 -I$(UTILITIES_DIR)/fileType/ \
|
|
14 -I$(UTILITIES_DIR)/BamTools/include \
|
|
15 -I$(UTILITIES_DIR)/BamTools-Ancillary \
|
|
16 -I$(UTILITIES_DIR)/chromsweep \
|
|
17
|
|
18 # ----------------------------------
|
|
19 # define our source and object files
|
|
20 # ----------------------------------
|
|
21 SOURCES= intersectMain.cpp intersectBed.cpp
|
|
22 OBJECTS= $(SOURCES:.cpp=.o)
|
|
23 _EXT_OBJECTS=bedFile.o lineFileUtilities.o BamAncillary.o gzstream.o fileType.o chromsweep.o
|
|
24 EXT_OBJECTS=$(patsubst %,$(OBJ_DIR)/%,$(_EXT_OBJECTS))
|
|
25 BUILT_OBJECTS= $(patsubst %,$(OBJ_DIR)/%,$(OBJECTS))
|
|
26 PROGRAM= intersectBed
|
|
27
|
|
28 all: $(PROGRAM)
|
|
29
|
|
30 .PHONY: all
|
|
31
|
|
32 $(PROGRAM): $(BUILT_OBJECTS) $(EXT_OBJECTS)
|
|
33 @echo " * linking $(PROGRAM)"
|
|
34 @$(CXX) $(LDFLAGS) $(CXXFLAGS) -o $(BIN_DIR)/$@ $^ -L$(UTILITIES_DIR)/BamTools/lib/ -lbamtools $(LIBS)
|
|
35
|
|
36 $(BUILT_OBJECTS): $(SOURCES)
|
|
37 @echo " * compiling" $(*F).cpp
|
|
38 @$(CXX) -c -o $@ $(*F).cpp $(LDFLAGS) $(CXXFLAGS) $(INCLUDES)
|
|
39
|
|
40 $(EXT_OBJECTS):
|
|
41 @$(MAKE) --no-print-directory -C $(UTILITIES_DIR)/bedFile/
|
|
42 @$(MAKE) --no-print-directory -C $(UTILITIES_DIR)/lineFileUtilities/
|
|
43 @$(MAKE) --no-print-directory -C $(UTILITIES_DIR)/BamTools/
|
|
44 @$(MAKE) --no-print-directory -C $(UTILITIES_DIR)/BamTools-Ancillary/
|
|
45 @$(MAKE) --no-print-directory -C $(UTILITIES_DIR)/gzstream/
|
|
46 @$(MAKE) --no-print-directory -C $(UTILITIES_DIR)/fileType/
|
|
47 @$(MAKE) --no-print-directory -C $(UTILITIES_DIR)/chromsweep/
|
|
48
|
|
49 clean:
|
|
50 @echo "Cleaning up."
|
|
51 @rm -f $(OBJ_DIR)/* $(BIN_DIR)/*
|
|
52
|
|
53 .PHONY: clean
|