-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathMakefile
More file actions
48 lines (38 loc) · 977 Bytes
/
Copy pathMakefile
File metadata and controls
48 lines (38 loc) · 977 Bytes
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
############################################################################
# Makefile for Burrows-Wheeler transform library and sample program
#
############################################################################
CC = gcc
LD = gcc
CFLAGS = -O2 -Wall -Wextra -pedantic -ansi -c
LDFLAGS = -O2 -o
# libraries
LIBS = -L. -Loptlist -lbwt -loptlist
# Treat NT and non-NT windows the same
ifeq ($(OS),Windows_NT)
OS = Windows
endif
ifeq ($(OS),Windows)
EXE = .exe
DEL = del
else #assume Linux/Unix
EXE =
DEL = rm -f
endif
all: sample$(EXE)
sample$(EXE): sample.o libbwt.a optlist/liboptlist.a
$(LD) $< $(LIBS) $(LDFLAGS) $@
sample.o: sample.c bwxform.h optlist/optlist.h
$(CC) $(CFLAGS) $<
libbwt.a: bwxform.o
ar crv libbwt.a bwxform.o
ranlib libbwt.a
bwxform.o: bwxform.c bwxform.h
$(CC) $(CFLAGS) $<
optlist/liboptlist.a:
cd optlist && $(MAKE) liboptlist.a
clean:
$(DEL) *.o
$(DEL) *.a
$(DEL) sample$(EXE)
cd optlist && $(MAKE) clean