summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile42
1 files changed, 42 insertions, 0 deletions
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..b48bf99
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,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