forked from toresbe/libatemkontroll
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
38 lines (30 loc) · 887 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
CC=cc
CXX=g++
RM=rm -f
MAKE=make
CPPFLAGS=-g -pedantic -fPIC -std=gnu++11 -Wall -Wextra -I.
LDFLAGS=-shared -pthread -ldl
TARGET_LIB=libatemkontroll.so
SRCS=$(wildcard network/*.cpp) $(wildcard features/*.cpp) atem.cpp loguru.cpp
OBJS=$(subst .cpp,.o,$(SRCS))
PREFIX=/usr
all: ${TARGET_LIB} utils
${TARGET_LIB}: $(OBJS)
$(CC) ${LDFLAGS} -o $@ $^
clean:
$(RM) $(OBJS)
distclean: clean
$(RM) ${TARGET_LIB} ${OBJS}
utils: utils/
$(MAKE) -C utils
.PHONY: install
install: $(TARGET_LIB)
cp $(TARGET_LIB) $(PREFIX)/lib/$(TARGET_LIB)
mkdir -p $(PREFIX)/lib
mkdir -p $(PREFIX)/include/
mkdir -p $(PREFIX)/include/atem/network
mkdir -p $(PREFIX)/include/atem/features
cp atem.hpp $(PREFIX)/include/
cp $(wildcard network/*.hpp) $(PREFIX)/include/atem/network
cp $(wildcard features/*.hpp) $(PREFIX)/include/atem/features
cp libatemkontroll.pc $(PREFIX)/lib/pkgconfig/