Skip to content
This repository has been archived by the owner on Mar 16, 2022. It is now read-only.

Commit

Permalink
Merge pull request #4 from pb-cdunn/better-makefile
Browse files Browse the repository at this point in the history
simpler GNUmakefile
  • Loading branch information
Christopher Dunn committed Aug 1, 2015
2 parents 1a0ff60 + abd5e84 commit dc506e6
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 57 deletions.
78 changes: 21 additions & 57 deletions GNUmakefile
Original file line number Diff line number Diff line change
@@ -1,61 +1,25 @@
CFLAGS = -O3 -Wall -Wextra -fno-strict-aliasing -Wno-unused-result

ALL = daligner daligner_p HPCdaligner HPCmapper LAsort LAmerge LAsplit LAcat LAshow LAcheck LA4Falcon DB2Falcon DB.so

all: $(ALL)

daligner: daligner.c filter.c filter.h align.c align.h DB.c DB.h QV.c QV.h
gcc $(CFLAGS) -o daligner daligner.c filter.c align.c DB.c QV.c -lpthread -lm

daligner_p: daligner.c filter.c filter.h align.c align.h DB.c DB.h QV.c QV.h
gcc $(CFLAGS) -o daligner_p daligner.c filter.c align.c DB.c QV.c -lpthread -lm -DFALCON_DALIGNER_P

HPCdaligner: HPCdaligner.c DB.c DB.h QV.c QV.h
gcc $(CFLAGS) -o HPCdaligner HPCdaligner.c DB.c QV.c -lm

HPCmapper: HPCmapper.c DB.c DB.h QV.c QV.h
gcc $(CFLAGS) -o HPCmapper HPCmapper.c DB.c QV.c -lm

LAsort: LAsort.c align.h DB.c DB.h QV.c QV.h
gcc $(CFLAGS) -o LAsort LAsort.c DB.c QV.c -lm

LAmerge: LAmerge.c align.h DB.c DB.h QV.c QV.h
gcc $(CFLAGS) -o LAmerge LAmerge.c DB.c QV.c -lm

LAshow: LAshow.c align.c align.h DB.c DB.h QV.c QV.h
gcc $(CFLAGS) -o LAshow LAshow.c align.c DB.c QV.c -lm

LA4Falcon: LA4Falcon.c align.c align.h DB.c DB.h QV.c QV.h
gcc $(CFLAGS) -o LA4Falcon LA4Falcon.c align.c DB.c QV.c -lm

LAcat: LAcat.c align.h DB.c DB.h QV.c QV.h
gcc $(CFLAGS) -o LAcat LAcat.c DB.c QV.c -lm

LAsplit: LAsplit.c align.h DB.c DB.h QV.c QV.h
gcc $(CFLAGS) -o LAsplit LAsplit.c DB.c QV.c -lm

LAcheck: LAcheck.c align.c align.h DB.c DB.h QV.c QV.h
gcc $(CFLAGS) -o LAcheck LAcheck.c align.c DB.c QV.c -lm

DB2Falcon: DB2Falcon.c DB.c DB.h QV.c QV.h
gcc $(CFLAGS) -o DB2Falcon DB2Falcon.c DB.c QV.c -lm

DB.so: DB.c DB.h QV.c QV.h
gcc $(CFLAGS) -shared -fPIC -o DB.so DB.c QV.c -lm

THISDIR:=$(abspath $(dir $(lastword ${MAKEFILE_LIST})))
CFLAGS+= -O3 -Wall -Wextra -fno-strict-aliasing -Wno-unused-result
CPPFLAGS+= -MMD -MP -I${THISDIR}/../DAZZ_DB
LDLIBS+= -ldazzdb -lm -lpthread
LDFLAGS+= -L${THISDIR}/../DAZZ_DB
MOST = daligner HPCdaligner HPCmapper LAsort LAmerge LAsplit LAcat LAshow LAcheck LA4Falcon DB2Falcon
ALL:=${MOST} daligner_p
vpath %.c ${THISDIR}
vpath %.a ${THISDIR}/../DAZZ_DB

all: ${ALL}
daligner: filter.o
daligner_p: filter_p.o
${ALL}: align.o

clean:
rm -f $(ALL)
rm -f LAupgrade.Dec.31.2014
rm -f daligner.tar.gz

LAupgrade.Dec.31.2014: LAupgrade.Dec.31.2014.c align.c align.h DB.c DB.h QV.c QV.h
gcc $(CFLAGS) -o LAupgrade.Dec.31.2014 LAupgrade.Dec.31.2014.c align.c DB.c QV.c -lm

rm -f ${ALL}
rm -f ${DEPS}
rm -fr *.dSYM *.o

install:
cp $(ALL) ~/bin
.PHONY: clean all

package:
make clean
tar -zcf daligner.tar.gz README *.h *.c Makefile
SRCS:=$(notdir $(wildcard ${THISDIR}/*.c))
DEPS:=$(patsubst %.c,%.d,${SRCS})
-include ${DEPS}
8 changes: 8 additions & 0 deletions README_PB.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
We have removed DB and QV files, since there are identical in DAZZ_DB.

Now, this package will not build unless the DAZZ_DB directory is supplied.

CPPFLAGS+= -Idazzdb-build-dir
LDFLAGS+= -Ldazzdb-build-dir

For now, we use a relative path, `../DAZZ_DB`, assuming we are both submodules.
1 change: 1 addition & 0 deletions daligner_p.c
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
#include "daligner.c"
2 changes: 2 additions & 0 deletions filter_p.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#define FALCON_DALIGNER_P
#include "filter.c"

0 comments on commit dc506e6

Please sign in to comment.