-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile-common.mk
31 lines (26 loc) · 987 Bytes
/
Makefile-common.mk
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
# Get latest version tag if in a tagged git repository, else from a local file
VERSION = $(shell git describe --dirty 2>/dev/null || cat VERSION)
# Default, overridable build flags (REL = release, DBG = debug)
USERFLAGS ?=
CFLAGS ?= -Wall -Wextra -Wstrict-prototypes -Wshadow -Wundef -pedantic $(USERFLAGS)
RELFLAGS ?= -O2 -g -DNDEBUG
DBGFLAGS ?= -Og -g3 -ggdb -gdwarf -DDEBUG
LDFLAGS ?=
# -Wconversion
# Dynamic libraries to be linked
LIBRARIES = inih
# Object files
OBJECTS = src/feature.o \
src/main-helpers.o \
src/markdown.o \
src/parse_value.o \
src/parse_vars.o \
src/socket_io.o \
src/stream_io.o \
src/recode.o \
src/utf8.o \
src/writer.o \
src/main.o
# Additional compiler and linker library flags
CFLAGS += $(shell pkg-config --cflags $(LIBRARIES)) -DVERSION=\"$(VERSION)\"
LDFLAGS += $(shell pkg-config --libs $(LIBRARIES))