Skip to content

Commit

Permalink
Update gitignore
Browse files Browse the repository at this point in the history
Makefile update for version
  • Loading branch information
harlequin committed Jun 28, 2016
1 parent 1bdfc28 commit 51b70e0
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 20 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,5 @@
/.cproject
/*.so
/.build

*.o
10 changes: 5 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -20,18 +20,18 @@ 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), )
$(error No platform selected!)
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 $@
Expand Down
23 changes: 8 additions & 15 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,23 +17,16 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#

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
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

0 comments on commit 51b70e0

Please sign in to comment.