summaryrefslogtreecommitdiff
path: root/Makefile
blob: b48bf99ce3f1117a94a3bede79031b2f40b736ea (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
33
34
35
36
37
38
39
40
41
42
.POSIX:

CFLAGS  = -std=c99 -O0 -D_POSIX_C_SOURCE=200809 -g
LDFLAGS = -lswresample -lavutil -lavcodec -lavformat -lpthread

AUDIO = \
	audio/decoder.c\
	audio/encoder.c\
	audio/muxer.c\
	audio/resampler.c\
	audio/stream.c\

SRC = $(AUDIO) main.c streamer.c playlist.c transmuxer.c daemon.c common.c audio_muxer.c
OBJ = $(SRC:.c=.o)

all: cybd

.c.o:
	$(CC) $(CFLAGS) -c $< -o $@

audio/decoder.o:   audio/decoder.h
audio/encoder.o:   audio/encoder.h
audio/resampler.o: audio/resampler.h audio/encoder.h audio/decoder.h
audio/muxer.o:     audio/resampler.h audio/encoder.h audio/decoder.h audio/muxer.h

common.o:     common.h
main.o:       common.h daemon.h
daemon.o:     common.h daemon.h streamer.h
streamer.o:   common.h streamer.h playlist.h transmuxer.h
transmuxer.o: common.h transmuxer.h playlist.h audio/muxer.h
playlist.o:   common.h playlist.h

cybd: $(OBJ)
	$(CC) -o $@ $^ $(LDFLAGS)

clean:
	rm -f cybd $(OBJ) testmuxer.o test/*

testhls: testmuxer.o transmuxer.o playlist.o $(AUDIO:.c=.o)
	$(CC) -o $@ $^ $(LDFLAGS)

.PHONY: all clean