From 51b70e090cf138052fc1df4f741482a086041e37 Mon Sep 17 00:00:00 2001 From: harlequin Date: Tue, 28 Jun 2016 15:10:31 +0200 Subject: [PATCH] Update gitignore Makefile update for version --- .gitignore | 2 ++ Makefile | 10 +++++----- build.sh | 23 ++++++++--------------- 3 files changed, 15 insertions(+), 20 deletions(-) diff --git a/.gitignore b/.gitignore index 12e3e8a..d72d78c 100644 --- a/.gitignore +++ b/.gitignore @@ -3,3 +3,5 @@ /.cproject /*.so /.build + +*.o diff --git a/Makefile b/Makefile index 28f3819..aac8138 100644 --- a/Makefile +++ b/Makefile @@ -3,12 +3,12 @@ LIB_TV_MODEL= CFLAGS += -fPIC -O2 -std=gnu99 CFLAGS += -ldl -DBUILD_GIT_SHA=\"$(GIT_VERSION)\" GIT_VERSION := $(shell git describe --dirty --always --abbrev=4) -BRANCH := $(shell git symbolic-ref --short -q HEAD) +TAG := $(shell git describe --tags) ifeq ($(PLATFORM), D-MST) LIB_TV_MODEL=${PLATFORM} APP_OBJ += models/serie_d_mst.o - CFLAGS += -mel -mglibc -march=34kc + CFLAGS += -mglibc -march=34kc -mel endif ifeq ($(PLATFORM), H-MST) @@ -20,10 +20,10 @@ endif OBJS = $(APP_OBJ) -LIB:=libdvbapi-${PLATFORM}-${BRANCH}-${GIT_VERSION}.so +LIB:=libdvbapi-${PLATFORM}-${TAG}.so # DEFAULT VERSION INFORMATION -CFLAGS += -DLIB_NAME=\""dvbapi"\" -DLIB_VERSION=\""${BRANCH}"\" -DLIB_TV_MODELS=\""${LIB_TV_MODEL}"\" +CFLAGS += -DLIB_NAME=\""dvbapi"\" -DLIB_VERSION=\""${TAG}"\" -DLIB_TV_MODELS=\""${LIB_TV_MODEL}"\" all: libdvbapi.so ifeq ($(LIB_TV_MODEL), ) @@ -31,7 +31,7 @@ ifeq ($(LIB_TV_MODEL), ) endif libdvbapi.so: $(OBJS) - $(CROSS)gcc $(CFLAGS) $(OBJS) -shared -Wl,-soname,$(LIB) -o $(LIB) + $(CROSS)gcc $(CFLAGS) $(OBJS) $(LDFLAGS) -shared -Wl,-soname,$(LIB) -o $(LIB) #$(CROSS)gcc $(CFLAGS) $(OBJS) -shared -Wl,-soname,$@ -o $@ diff --git a/build.sh b/build.sh index def71df..be2b283 100644 --- a/build.sh +++ b/build.sh @@ -17,23 +17,16 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . # - BUILD_DIR=".build" -GIT_URL="https://github.com/harlequin/samygo-plugin-dvbapi.git" - -function clone2build { - echo "Building "$1" TARGET" - mkdir -p $BUILD_DIR"/"$1 - (cd $BUILD_DIR"/"$1;\ - git clone -b $3 --depth 1 $GIT_URL .;\ - CROSS=$2 make;\ - mv#.so "../samygo-plugin-dvbapi-"$3".so";\ - tar -zcvf "../samygo-plugin-dvbapi-"$3".tar.gz" "../samygo-plugin-dvbapi-"$3".so";\ - rm -rf "../samygo-plugin-dvbapi-"$3".so") -} rm -rf $BUILD_DIR mkdir -p $BUILD_DIR -clone2build samygo-plugin-dvbapi_D-MST mips-linux-gnu- D-MST-v0.1 -clone2build samygo-plugin-dvbapi_H-T-MST arm-none-linux-gnueabi- H-MST-v0.1 \ No newline at end of file +export CROSS=mips-linux-gnu- +make PLATFORM=D-MST +mv *.so $BUILD_DIR +make clean +export CROSS=arm-none-linux-gnueabi- +make PLATFORM=H-MST +mv *.so $BUILD_DIR +make clean \ No newline at end of file