mirror of
https://github.com/alsa-project/alsa-tools.git
synced 2025-10-28 05:40:23 -04:00
hdajackretask: Use autotools
Start to use autotools as build system, just like the other programs in the alsa-tools suite. Signed-off-by: David Henningsson <david.henningsson@canonical.com>
This commit is contained in:
parent
7aa4a74f88
commit
d06008f397
7 changed files with 62 additions and 20 deletions
1
hdajackretask/AUTHORS
Normal file
1
hdajackretask/AUTHORS
Normal file
|
|
@ -0,0 +1 @@
|
|||
David Henningsson <david.henningsson@canonical.com>
|
||||
1
hdajackretask/ChangeLog
Normal file
1
hdajackretask/ChangeLog
Normal file
|
|
@ -0,0 +1 @@
|
|||
For news and changelog, refer to git repository history. This file is only present because autotools requires it.
|
||||
|
|
@ -1,18 +0,0 @@
|
|||
SOURCES = main-gtk.c sysfs-pin-configs.c apply-changes.c
|
||||
|
||||
build:
|
||||
$(shell sed 's/\\/\\\\/g;s/"/\\"/g;s/^/"/;s/$$/\\n"/;' < README > README.generated.h)
|
||||
gcc -g -O0 -Wall -o hda-jack-retask $(SOURCES) $(shell pkg-config --cflags --libs gtk+-3.0)
|
||||
|
||||
clean:
|
||||
-rm hda-jack-retask
|
||||
-rm README.generated.h
|
||||
|
||||
install:
|
||||
install -Dm755 hda-jack-retask $(DESTDIR)/usr/bin/hda-jack-retask
|
||||
install -Dm644 README $(DESTDIR)/usr/share/doc/hda-jack-retask/README
|
||||
|
||||
uninstall:
|
||||
-rm $(DESTDIR)/usr/bin/hda-jack-retask
|
||||
|
||||
.PHONY: build install uninstall
|
||||
20
hdajackretask/Makefile.am
Normal file
20
hdajackretask/Makefile.am
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
EXTRA_DIST = gitcompile README
|
||||
AM_CFLAGS = @GTK3_CFLAGS@
|
||||
bin_PROGRAMS = hdajackretask
|
||||
man_MANS =
|
||||
hdajackretask_SOURCES = main-gtk.c sysfs-pin-configs.c apply-changes.c
|
||||
hdajackretask_LDADD = @GTK3_LIBS@
|
||||
|
||||
BUILT_SOURCES = README.generated.h
|
||||
nodist_hdajackretask_SOURCES = README.generated.h
|
||||
CLEANFILES = README.generated.h
|
||||
|
||||
README.generated.h:
|
||||
sed 's/\\/\\\\/g;s/"/\\"/g;s/^/"/;s/$$/\\n"/;' README >$@
|
||||
|
||||
alsa-dist: distdir
|
||||
@rm -rf ../distdir/hdajackretask
|
||||
@mkdir -p ../distdir/hdajackretask
|
||||
@cp -RLpv $(distdir)/* ../distdir/hdajackretask
|
||||
@rm -rf $(distdir)
|
||||
|
||||
1
hdajackretask/NEWS
Normal file
1
hdajackretask/NEWS
Normal file
|
|
@ -0,0 +1 @@
|
|||
For news and changelog, refer to git repository history. This file is only present because autotools requires it.
|
||||
10
hdajackretask/configure.in
Normal file
10
hdajackretask/configure.in
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
AC_INIT([hdajackretask], [0.20120413])
|
||||
AC_CONFIG_SRCDIR([main-gtk.c])
|
||||
AM_INIT_AUTOMAKE
|
||||
AC_PROG_CC
|
||||
AC_PROG_INSTALL
|
||||
AC_HEADER_STDC
|
||||
|
||||
PKG_CHECK_MODULES(GTK3, gtk+-3.0)
|
||||
|
||||
AC_OUTPUT(Makefile)
|
||||
|
|
@ -1,3 +1,30 @@
|
|||
#!/bin/sh
|
||||
#!/bin/bash
|
||||
|
||||
make GITCOMPILE_ARGS="$*"
|
||||
if test -z "$AUTOMAKE_DIR"; then
|
||||
if test -d /usr/local/share/automake; then
|
||||
AUTOMAKE_DIR=/usr/local/share/automake
|
||||
fi
|
||||
if test -d /usr/share/automake; then
|
||||
AUTOMAKE_DIR="/usr/share/automake"
|
||||
fi
|
||||
if test -z "$AUTOMAKE_DIR"; then
|
||||
AUTOMAKE_DIR=/usr/share/`ls /usr/share | grep automake | tail -n 1`
|
||||
fi
|
||||
fi
|
||||
|
||||
for f in install-sh mkinstalldirs missing; do
|
||||
cp -av $AUTOMAKE_DIR/$f . || exit 1
|
||||
done
|
||||
|
||||
aclocal $ACLOCAL_FLAGS || exit 1
|
||||
automake --add-missing --copy || exit 1
|
||||
touch depcomp || exit 1
|
||||
autoconf || exit 1
|
||||
export CFLAGS='-O2 -Wall -pipe -g'
|
||||
echo "CFLAGS=$CFLAGS"
|
||||
echo "./configure $@"
|
||||
./configure $@ || exit 1
|
||||
unset CFLAGS
|
||||
if [ -z "$GITCOMPILE_NO_MAKE" ]; then
|
||||
make || exit 1
|
||||
fi
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue