Statistics
| Branch: | Tag: | Revision:

streamers-build / Makefile @ 38047925

History | View | Annotate | Download (3.17 KB)

1
BASEDIR = $(shell pwd)
2
THIRDPARTYLIBS = $(BASEDIR)/THIRDPARTY-LIBS
3

    
4
.PHONY: $(THIRDPARTYLIBS) update
5

    
6
all: pack
7

    
8
simple: Streamers/streamer-grapes
9
ml: Streamers/streamer-ml-monl-grapes-static
10
chunkstream: Streamers/streamer-chunkstream ChunkerPlayer/chunker_player/chunker_player
11
ml-chunkstream: Streamers/streamer-ml-monl-chunkstream-static ChunkerPlayer/chunker_player/chunker_player
12

    
13
$(THIRDPARTYLIBS):
14
	$(MAKE) -C $(THIRDPARTYLIBS) || { echo "Error preparing third party libs" && exit 1; }
15

    
16
update:
17
	git pull
18
	git submodule update
19

    
20
Streamers/.git:
21
	git submodule update --init -- $(shell dirname $@)
22

    
23
Streamers/streamer-grapes: Streamers/.git $(THIRDPARTYLIBS)
24
	GRAPES=$(THIRDPARTYLIBS)/GRAPES FFMPEG_DIR=$(THIRDPARTYLIBS)/ffmpeg X264_DIR=$(THIRDPARTYLIBS)/x264 $(MAKE) -C Streamers  || { echo "Error compiling the Streamer" && exit 1; }
25

    
26
#version with NAPA-libs
27
Streamers/streamer-ml-monl-grapes-static: Streamers/.git $(THIRDPARTYLIBS)
28
	GRAPES=$(THIRDPARTYLIBS)/GRAPES FFMPEG_DIR=$(THIRDPARTYLIBS)/ffmpeg X264_DIR=$(THIRDPARTYLIBS)/x264 STATIC=2 NAPA=$(THIRDPARTYLIBS)/NAPA-BASELIBS/ LIBEVENT_DIR=$(THIRDPARTYLIBS)/NAPA-BASELIBS/3RDPARTY-LIBS/libevent ML=1 MONL=1 $(MAKE) -C Streamers || { echo "Error compiling the ML+MONL version of the Streamer" && exit 1; }
29

    
30
Streamers/streamer-chunkstream: Streamers/.git $(THIRDPARTYLIBS)
31
	IO=chunkstream GRAPES=$(THIRDPARTYLIBS)/GRAPES FFMPEG_DIR=$(THIRDPARTYLIBS)/ffmpeg X264_DIR=$(THIRDPARTYLIBS)/x264 $(MAKE) -C Streamers  || { echo "Error compiling the Streamer" && exit 1; }
32

    
33
Streamers/streamer-ml-monl-chunkstream-static: Streamers/.git $(THIRDPARTYLIBS)
34
	IO=chunkstream GRAPES=$(THIRDPARTYLIBS)/GRAPES FFMPEG_DIR=$(THIRDPARTYLIBS)/ffmpeg X264_DIR=$(THIRDPARTYLIBS)/x264 STATIC=2 NAPA=$(THIRDPARTYLIBS)/NAPA-BASELIBS/ LIBEVENT_DIR=$(THIRDPARTYLIBS)/NAPA-BASELIBS/3RDPARTY-LIBS/libevent ML=1 MONL=1 $(MAKE) -C Streamers || { echo "Error compiling the ML+MONL version of the Streamer" && exit 1; }
35

    
36
ChunkerPlayer/.git:
37
	git submodule update --init -- $(shell dirname $@)
38

    
39
ChunkerPlayer/chunker_player/chunker_player: ChunkerPlayer/.git $(THIRDPARTYLIBS)
40
	cd ChunkerPlayer && LOCAL_X264=$(THIRDPARTYLIBS)/x264-install LOCAL_FFMPEG=$(THIRDPARTYLIBS)/ffmpeg-install LOCAL_LIBOGG=$(THIRDPARTYLIBS)/libogg-install LOCAL_LIBVORBIS=$(THIRDPARTYLIBS)/libvorbis-install LOCAL_MP3LAME=$(THIRDPARTYLIBS)/mp3lame-install ./build_ul.sh
41

    
42
prepare:
43
	git submodule update --init
44

    
45
clean:
46
	$(MAKE) -C $(THIRDPARTYLIBS) clean
47
	$(MAKE) -C Streamers clean
48

    
49
pack: DIR = PeerStreamer-$(shell git describe --always --dirty)
50
pack: ml-chunkstream
51
	rm -rf $(DIR) $(DIR).tgz
52
	mkdir $(DIR)
53
	cp Streamers/streamer-ml-monl-chunkstream-static $(DIR)
54
	cp -r ChunkerPlayer/chunker_player/chunker_player ChunkerPlayer/chunker_player/icons ChunkerPlayer/chunker_player/channels.conf $(DIR)
55
	cp ChunkerPlayer/chunker_player/stats_font.ttf ChunkerPlayer/chunker_player/mainfont.ttf ChunkerPlayer/chunker_player/napalogo_small.bmp $(DIR)
56
	cp ChunkerPlayer/chunker_streamer/chunker_streamer ChunkerPlayer/chunker_streamer/chunker.conf $(DIR)
57
	echo streamer-ml-monl-chunkstream-static > $(DIR)/peer_exec_name.conf
58
	ln -s streamer-ml-monl-chunkstream-static $(DIR)/streamer
59
	cp scripts/* $(DIR)
60
	cp README $(DIR)
61
	tar czf $(DIR).tgz $(DIR)