.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