builder-mingw.mk 3.39 KB
Newer Older
smorlat's avatar
smorlat committed
1 2 3 4
prefix=/opt/linphone


MSX264_SRC_DIR=$(LINPHONE_SRC_DIR)/mediastreamer2/plugins/msx264
5
BUDDYLOOKUP_SRC_DIR=$(LINPHONE_SRC_DIR)/coreapi/plugins/buddylookup
smorlat's avatar
smorlat committed
6 7 8
LOCALDIR=$(shell pwd)
WORKDIR=$(LOCALDIR)/build
LINPHONE_ZIP=$(WORKDIR)/linphone.zip
9
BUDDYLOOKUP_ZIP=$(WORKDIR)/buddylookup.zip
smorlat's avatar
smorlat committed
10 11 12 13
MSX264_ZIP=$(WORKDIR)/msx264.zip
INSTALL_ROOT=$(WORKDIR)/root
FILELIST=$(WORKDIR)/linphone-bundle.filelist

14
LINPHONE_VERSION=strings $(INSTALL_ROOT)/bin/linphone.exe |grep linphone_ident | sed 's/linphone_ident_string=//'
smorlat's avatar
smorlat committed
15 16 17 18 19 20 21 22 23

$(WORKDIR):
	mkdir -p $(WORKDIR)

$(INSTALL_ROOT): $(WORKDIR)
	mkdir -p $(INSTALL_ROOT)



smorlat's avatar
smorlat committed
24
#Inno Setup 5 compiler
Simon Morlat's avatar
Simon Morlat committed
25
ISCC="c:\Program Files\Inno setup 5\ISCC.exe"
smorlat's avatar
smorlat committed
26 27 28 29 30 31

$(LINPHONE_SRC_DIR)/configure:
	cd $(LINPHONE_SRC_DIR) && ./autogen.sh

$(LINPHONE_SRC_DIR)/Makefile: $(LINPHONE_SRC_DIR)/configure
	cd $(LINPHONE_SRC_DIR) && \
32
	./configure --prefix=$(prefix) --enable-shared --disable-static $(LINPHONE_CONFIGURE_EXTRA_OPTIONS)
smorlat's avatar
smorlat committed
33 34

build-linphone:	$(LINPHONE_SRC_DIR)/Makefile
smorlat's avatar
smorlat committed
35
	cd $(LINPHONE_SRC_DIR) && make newdate && make $(LINPHONE_MAKE_OPTS) && make install $(LINPHONE_MAKE_OPTS)
smorlat's avatar
smorlat committed
36

37
$(LINPHONE_ZIP):	build-linphone $(WORKDIR)
smorlat's avatar
smorlat committed
38
	cd $(LINPHONE_SRC_DIR) && make zip ZIPFILE=$(LINPHONE_ZIP) $(LINPHONE_MAKE_OPTS)
smorlat's avatar
smorlat committed
39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76

install-linphone: $(LINPHONE_ZIP) $(INSTALL_ROOT)
	cd $(INSTALL_ROOT) && unzip -o $(LINPHONE_ZIP)

clean-linphone:
	- cd  $(LINPHONE_SRC_DIR) && make clean

veryclean-linphone:
	- cd $(LINPHONE_SRC_DIR) && make distclean
	- cd $(LINPHONE_SRC_DIR) && rm configure

##### msx264 rules

$(MSX264_SRC_DIR)/configure:
	cd $(MSX264_SRC_DIR) && ./autogen.sh


$(MSX264_SRC_DIR)/Makefile:	$(MSX264_SRC_DIR)/configure
	cd $(MSX264_SRC_DIR) && \
	PKG_CONFIG_PATH=$(prefix)/lib/pkgconfig ./configure --prefix=$(prefix) --enable-shared --disable-static --enable-hacked-x264


build-msx264:	build-linphone $(MSX264_SRC_DIR)/Makefile
	cd $(MSX264_SRC_DIR) && PKG_CONFIG_PATH=$(prefix)/lib/pkgconfig make

$(MSX264_ZIP):	build-msx264
	cd $(MSX264_SRC_DIR) && make zip ZIPFILE=$(MSX264_ZIP)

install-msx264:	$(MSX264_ZIP) $(INSTALL_ROOT)
	cd $(INSTALL_ROOT) && unzip -o $(MSX264_ZIP)

clean-msx264:
	- cd  $(MSX264_SRC_DIR) && make clean

veryclean-msx264:
	- cd $(MSX264_SRC_DIR) && make distclean
	- cd $(MSX264_SRC_DIR) && rm configure

77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104
###### buddylookup rules

$(BUDDYLOOKUP_SRC_DIR)/configure:
	cd $(BUDDYLOOKUP_SRC_DIR) && ./autogen.sh


$(BUDDYLOOKUP_SRC_DIR)/Makefile:	$(BUDDYLOOKUP_SRC_DIR)/configure
	cd $(BUDDYLOOKUP_SRC_DIR) && \
	PKG_CONFIG_PATH=$(prefix)/lib/pkgconfig ./configure --prefix=$(prefix) --enable-shared --disable-static


build-buddylookup:	build-linphone $(BUDDYLOOKUP_SRC_DIR)/Makefile
	cd $(BUDDYLOOKUP_SRC_DIR) && PKG_CONFIG_PATH=$(prefix)/lib/pkgconfig make

$(BUDDYLOOKUP_ZIP):	build-buddylookup
	cd $(BUDDYLOOKUP_SRC_DIR) && make zip ZIPFILE=$(BUDDYLOOKUP_ZIP)

install-buddylookup:	$(BUDDYLOOKUP_ZIP) $(INSTALL_ROOT)
	cd $(INSTALL_ROOT) && unzip -o $(BUDDYLOOKUP_ZIP)

clean-buddylookup:
	- cd  $(BUDDYLOOKUP_SRC_DIR) && make clean

veryclean-buddylookup:
	- cd $(BUDDYLOOKUP_SRC_DIR) && make distclean
	- cd $(BUDDYLOOKUP_SRC_DIR) && rm configure


smorlat's avatar
smorlat committed
105 106 107 108 109 110 111 112 113 114 115 116
$(FILELIST): 
	cd $(INSTALL_ROOT) && \
	rm -f $(FILELIST) && \
	for file in `find` ; do \
		if ! test -d $$file ; then \
			echo "Source: $$file; Destdir: {app}\\`dirname $$file`; Flags: ignoreversion" \
			>> $(FILELIST) ;\
		fi \
	done

clean-install:
	rm -rf $(INSTALL_ROOT)