1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57
|
BIN = .
SRC = ./src
INC = ./include
OBJ = .
COMMON = $(OBJ)/align.o \
$(OBJ)/cluster.o \
$(OBJ)/distancemat.o \
$(OBJ)/options.o \
$(OBJ)/util.o \
$(OBJ)/sequence.o
QUICKTREEOBJ = $(COMMON) $(OBJ)/quicktree.o $(OBJ)/buildtree.o $(OBJ)/tree.o
CC ?= gcc
CFLAGS ?= -O2
CFLAGS += -Wunused-result
CFLAGS += -c -I$(INC)
LDFLAGS += -g
all: quicktree
quicktree : $(QUICKTREEOBJ)
$(CC) $(LDFLAGS) -o $@ $(QUICKTREEOBJ) -lm
$(OBJ)/quicktree.o : $(SRC)/quicktree.c $(INC)/version.h
$(CC) $(CFLAGS) -o $(OBJ)/quicktree.o $(SRC)/quicktree.c
$(OBJ)/align.o : $(SRC)/align.c $(INC)/align.h
$(CC) $(CFLAGS) -o $(OBJ)/align.o $(SRC)/align.c
$(OBJ)/buildtree.o : $(SRC)/buildtree.c $(INC)/buildtree.h
$(CC) $(CFLAGS) -o $(OBJ)/buildtree.o $(SRC)/buildtree.c
$(OBJ)/cluster.o : $(SRC)/cluster.c $(INC)/cluster.h
$(CC) $(CFLAGS) -o $(OBJ)/cluster.o $(SRC)/cluster.c
$(OBJ)/distancemat.o : $(SRC)/distancemat.c $(INC)/distancemat.h
$(CC) $(CFLAGS) -o $(OBJ)/distancemat.o $(SRC)/distancemat.c
$(OBJ)/sequence.o : $(SRC)/sequence.c $(INC)/sequence.h
$(CC) $(CFLAGS) -o $(OBJ)/sequence.o $(SRC)/sequence.c
$(OBJ)/tree.o : $(SRC)/tree.c $(INC)/tree.h
$(CC) $(CFLAGS) -o $(OBJ)/tree.o $(SRC)/tree.c
$(OBJ)/util.o : $(SRC)/util.c $(INC)/util.h
$(CC) $(CFLAGS) -o $(OBJ)/util.o $(SRC)/util.c
$(OBJ)/options.o : $(SRC)/options.c $(INC)/options.h
$(CC) $(CFLAGS) -o $(OBJ)/options.o $(SRC)/options.c
clean:
rm -f $(OBJ)/*.o quicktree
|