Skip to content
Snippets Groups Projects
Commit 3e3e0bd5 authored by Nicolas Dechesne's avatar Nicolas Dechesne
Browse files

makefile: add autotools support


Removed the original makefile, and add standard autotools files.

To build now, run:

./autogen.sh
make

./autogen.sh is needed only the first time, or when configure.ac or any
Makefile.am files change.

Signed-off-by: default avatarNicolas Dechesne <nicolas.dechesne@linaro.org>
parent d1b3931a
Branches pristine-tar
No related tags found
No related merge requests found
#
# Copyright (c) 2014 Linaro
#
# Permission is hereby granted, free of charge, to any person obtaining a
# copy of this software and associated documentation files (the "Software"),
# to deal in the Software without restriction, including without limitation
# the rights to use, copy, modify, merge, publish, distribute, sublicense,
# and/or sell copies of the Software, and to permit persons to whom the
# Software is furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice (including the next
# paragraph) shall be included in all copies or substantial portions of the
# Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.
#
SUBDIRS = decodertest
#! /bin/sh
srcdir=`dirname $0`
test -z "$srcdir" && srcdir=.
ORIGDIR=`pwd`
cd $srcdir
mkdir -p m4
autoreconf -v --install || exit 1
cd $ORIGDIR || exit $?
$srcdir/configure --enable-maintainer-mode "$@"
dnl Process this file with autoconf to produce a configure script.
AC_INIT([vidcdectest], [0.1], [https://git.linaro.org/landing-teams/working/qualcomm/vidctest.git])
AC_CONFIG_SRCDIR([Makefile.am])
AC_CONFIG_HEADERS([config.h])
AC_CONFIG_AUX_DIR([build-aux])
AC_CONFIG_MACRO_DIR([m4])
# Initialize Automake
AM_INIT_AUTOMAKE([foreign dist-bzip2])
AM_MAINTAINER_MODE
# Enable quiet compiles on automake 1.11.
m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
AC_PROG_LIBTOOL
PKG_CHECK_MODULES(LIBAVFORMAT, libavformat)
PKG_CHECK_MODULES(LIBAVCODEC, libavcodec)
PKG_CHECK_MODULES(LIBAVUTIL, libavutil)
AC_CONFIG_FILES([Makefile
decodertest/Makefile])
AC_OUTPUT
all: vidctest
SRC=queue.c message_queue.c decoder_driver_test.c
OBJ=$(patsubst %.c,%.o,$(SRC))
CC = $(CROSS_COMPILE)gcc
LDFLAGS += -lpthread -lavformat -lavcodec -lavutil
vidctest: $(OBJ)
$(CC) $^ $(LDFLAGS) -o $@
%.o: %.c
$(CC) -c -o $@ $<
clean:
-rm -f $(OBJ)
-rm -f vidctest
#
# Copyright (c) 2014 Linaro
#
# Permission is hereby granted, free of charge, to any person obtaining a
# copy of this software and associated documentation files (the "Software"),
# to deal in the Software without restriction, including without limitation
# the rights to use, copy, modify, merge, publish, distribute, sublicense,
# and/or sell copies of the Software, and to permit persons to whom the
# Software is furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice (including the next
# paragraph) shall be included in all copies or substantial portions of the
# Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.
#
bin_PROGRAMS = vidctest
vidctest_LDFLAGS = \
-no-undefined
vidctest_LDADD = \
$(LIBAVFORMAT_LIBS) \
$(LIBAVCODEC_LIBS) \
$(LIBAVUTIL_LIBS)
vidctest_CFLAGS = \
-O0 -g -lpthread \
$(LIBAVFORMAT_CFLAGS) \
$(LIBAVCODEC_CFLAGS) \
$(LIBAVUTIL_CFLAGS)
vidctest_SOURCES = \
queue.c \
message_queue.c \
decoder_driver_test.c
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment