forked from saulrh/Liberty-Daemon
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
48 lines (32 loc) · 1.04 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
CC := gcc
CXX := g++
#include /usr/share/make-common/common.1.mk
CXXFLAGS := -I./include -g -Wall
CFLAGS := --std=gnu99 -O0 -I./include -g -Wall
#default: $(LIBFILES) $(BINFILES)
#$(call LINKBIN, fastrakd, fastrak.o fastrakd.o, amino somatic stdc++ reflex)
#.PHONY: default clean
BINARIES := libertyd #liberty-test
HEADERS := include/liberty.h include/liberty_utils.h
all : $(BINARIES)
LIBS := -lach -lrt -lc -lm -lusb-1.0
#LIBS := -lrt -lc -lm -lusb-1.0
PiTracker.o: src/PiTracker.cpp
$(CXX) $(CXXFLAGS) -o $@ src/PiTracker.cpp $(LIBS)
LIBERTY_OBJS := src/daemonizer.o src/liberty.o src/PiTracker.o src/libertyd.o
libertyd: $(LIBERTY_OBJS)
$(CXX) $(CXXFLAGS) -o $@ $(LIBERTY_OBJS) $(LIBS)
#liberty-test: $(LIBERTY_OBJS)
# $(CC) $(CFLAGS) -o $@ $(LIBERTY_OBJS) $(LIBS)
%.o: %.c
$(CC) $(CFLAGS) -o $@ -c $<
%.o: %.cpp
$(CXX) $(CXXFLAGS) -o $@ -c $<
install: libertyd
install -D $(BINARIES) /usr/bin/$(BINARIES)
install -D include/liberty.h /usr/include/liberty.h
.PHONY: install
clean:
rm -fr $(BINARIES) src/*.o
depclean: clean
rm -fr .deps