summarylogtreecommitdiffstats
path: root/libarstream2-Makefile
blob: 2a2cc456e6a4fa14cb40880be2c0c3132c30bc7e (plain)
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
CC = gcc
CFLAGS = -fPIC -Wall -Wextra -O2 -g -IIncludes -DHAVE_CONFIG_H
LIBS = -larsal -lm
LDFLAGS = -shared -Wl,-O1,-as-needed,-no-undefined,-z,relro,-z,now
RM = rm -f
TARGET_LIB = libarstream2.so

SRCS = gen/Sources/arstream2_error.c \
	src/arstream2_h264_filter.c \
	src/arstream2_h264_parser.c \
	src/arstream2_h264_sei.c \
	src/arstream2_h264_writer.c \
	src/arstream2_rtp_receiver.c \
	src/arstream2_rtp_sender.c \
	src/arstream2_stream_recorder.c \
	src/arstream2_stream_receiver.c
OBJS = $(SRCS:.c=.o)

.PHONY: all
all: ${TARGET_LIB}

$(TARGET_LIB): $(OBJS)
	$(CC) ${LDFLAGS} -o $@ $^ ${LIBS}

$(SRCS:.c=.d):%.d:%.c
	$(CC) $(CFLAGS) -MM $< >$@

include $(SRCS:.c=.d)

.PHONY: clean
clean:
	-${RM} ${TARGET_LIB} ${OBJS} $(SRCS:.c=.d)