-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
73 lines (61 loc) · 1.76 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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
###########################################################################
# last changed Time-stamp: <2017-08-17 11:28:40 adonath>
###########################################################################
#
# 'make' build gappy binary
# 'make install' install gappy binary in bin/
# 'make uninstall' uninstall gappy
# 'make clean' remove all .o and executable files
# Installation targets
#
prefix = $(CURDIR)
bindir = $(prefix)/bin
# Compiler details
#
CC = g++
# compile-time flags
CFLAGS = -ansi -g -O3 -funroll-loops
WARN = -Wall -Wpedantic
# define any directories containing header files
INCLUDES = -I/usr/include
# library paths
LFLAGS = -L/usr/lib64/ -L/usr/lib/
# define any libraries to link into executable:
LIBS =
# source files
SOURCES = gaps.cpp utils.cpp options.cpp files.cpp
# object files
OBJS = $(SOURCES:.cpp=.o)
# Package information
#
MAIN = gappy
VERSION = 0.0.2
# Other tools
#
INSTALL = /usr/bin/install -c
###
.PHONY: all clean install uninstall
#all: Compile gappy binary
all:
@echo Building $(MAIN) version $(VERSION).
$(MAKE) -C src/ all
@echo Done building $(MAIN) version $(VERSION).
# this is a suffix replacement rule for building .o's from .cpp's
# it uses automatic variables $<: the name of the prerequisite of
# the rule(a .cpp file) and $@: the name of the target of the rule (a .o file)
# (see the gnu make manual section about automatic variables)
.cpp.o:
$(CC) $(CFLAGS) $(INCLUDES) $(WARN) -c $< -o $@
# install: installs the binary in $(bindir)/
install:
@echo Installing gappy in ./bin/
$(MAKE) -C src/ install
@echo Done installing.
uninstall:
@echo Uninstalling gappy.
$(MAKE) -C src/ uninstall
@echo Done uninstalling.
clean:
@echo Remove unecessary files.
$(MAKE) -C src/ clean
@echo Done removing.