forked from Openvario/variod
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
38 lines (29 loc) · 839 Bytes
/
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
# Makefile for sensord
#Some compiler stuff and flags
CFLAGS += -g -Wall -fpermissive
EXECUTABLE = variod
_OBJ = audiovario.o variod.o cmdline_parser.o configfile_parser.o nmea_parser.o stf.o utils.o
OBJ = $(patsubst %,$(ODIR)/%,$(_OBJ))
OBJ_CAL = $(patsubst %,$(ODIR)/%,$(_OBJ_CAL))
LIBS = -lpulse -lm -lpthread
ODIR = obj
BINDIR = /opt/bin/
GIT_VERSION := $(shell git describe --abbrev=4 --dirty --always --tags)
#targets
$(ODIR)/%.o: %.c
mkdir -p $(ODIR)
$(CXX) -DVERSION_GIT=\"$(GIT_VERSION)\" -c -o $@ $< $(CFLAGS)
all: variod
doc:
@echo Running doxygen to create documentation
doxygen
version.h:
@echo Git version $(GIT_VERSION)
variod: $(OBJ)
$(CXX) -g -o $@ $^ $(LIBS)
install: variod
install -D variod $(BINDIR)/$(EXECUTABLE)
clean:
rm -f $(ODIR)/*.o *~ core $(EXECUTABLE)
rm -fr doc
.PHONY: clean all doc