-
Notifications
You must be signed in to change notification settings - Fork 2
/
Makefile
56 lines (40 loc) · 1.48 KB
/
Makefile
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
PROGS=capmq
all: $(PROGS)
CC=gcc
HTSDIR=../htslib
HTSSRC=$(HTSDIR)
ZLIB_LIBS=-lz
ZLIB_INCLUDES=
INCLUDES=-I$(HTSDIR)/include -I$(HTSSRC) $(ZLIB_INCLUDES)
LIBS=-L$(HTSDIR)/lib -L$(HTSDIR) -lhts -Wl,--rpath,$(HTSDIR)/lib -Wl,--rpath,$(HTSDIR) -lpthread $(ZLIB_LIBS) -lm -ldl
CFLAGS=-O3 -g -Wall -Werror
PACKAGE_VERSION = 0.5
# If building from a Git repository, replace $(PACKAGE_VERSION) with the Git
# description of the working tree: either a release tag with the same value
# as $(PACKAGE_VERSION) above, or an exact description likely based on a tag.
# $(shell), :=, etc are GNU Make-specific. If you don't have GNU Make,
# comment out this conditional.
ifneq "$(wildcard .git)" ""
PACKAGE_VERSION := $(shell git describe --always --dirty)
# Force version.h to be remade if $(PACKAGE_VERSION) has changed.
version.h: $(if $(wildcard version.h),$(if $(findstring "$(PACKAGE_VERSION)",$(shell cat version.h)),,force))
endif
# If you don't have GNU Make but are building from a Git repository, you may
# wish to replace this with a rule that always rebuilds version.h:
# version.h: force
# echo '#define CAPMQ_VERSION "`git describe --always --dirty`"' > $@
version.h:
echo '#define CAPMQ_VERSION "$(PACKAGE_VERSION)"' > $@
print-version:
@echo $(PACKAGE_VERSION)
check test: capmq t_capmq
./t_capmq
.c.o:
$(CC) $(CFLAGS) $(INCLUDES) -c $<
clean:
-rm -f *.o $(PROGS)
capmq: $(HTSLIB) version.h capmq.o
$(CC) -o $@ capmq.o $(CFLAGS) $(LDFLAGS) $(LIBS)
t_capmq: t_capmq.o
force:
.PHONY: force