Autotools in the "test" branch

This commit is contained in:
Stefan Talpalaru 2017-06-20 02:00:27 +02:00
parent 6b6c6e9870
commit 1c1469ba53
No known key found for this signature in database
GPG key ID: CBF7934204F1B6F9
41 changed files with 1748 additions and 18 deletions

44
.gitignore vendored
View file

@ -2,3 +2,47 @@
!.gitignore
!.travis.yml
!.valgrind.supp
# Object files
*.o
*.ko
*.obj
*.elf
build
tg-timer.res
# Executables
*.exe
*.out
*.app
*.i*86
*.x86_64
*.hex
tg-timer
tg-timer-dbg
tg-timer-prf
tg-timer-vlg
# autotools
Makefile
Makefile.in
/autom4te.cache
/aclocal.m4
/compile
/configure
/depcomp
/install-sh
/missing
/stamp-h1
/config.*
/libtool
/ltmain.sh
/test-driver
/test-suite.log
.libs
.deps
.dirstamp
*.log
*.trs
*.tar.gz

View file

@ -38,7 +38,9 @@ before_script:
fi;
if [[ "$TARGET" == "test" ]]; then
mkdir -p ~/.config;
fi
fi;
script:
make "$TARGET"
./autogen.sh;
./configure;
make "$TARGET";

66
Makefile.am Normal file
View file

@ -0,0 +1,66 @@
SUBDIRS = icons
bin_PROGRAMS = tg-timer
EXTRA_PROGRAMS = tg-timer-dbg \
tg-timer-prf \
tg-timer-vlg
MOSTLYCLEANFILES := $(EXTRA_PROGRAMS)
tg_timer_SOURCES = src/algo.c \
src/audio.c \
src/computer.c \
src/config.c \
src/interface.c \
src/output_panel.c \
src/serializer.c \
src/tg.h
if HAVE_WINDRES
tg_timer_SOURCES += tg-timer.res
endif
tg_timer_dbg_SOURCES = $(tg_timer_SOURCES)
tg_timer_prf_SOURCES = $(tg_timer_SOURCES)
tg_timer_vlg_SOURCES = $(tg_timer_SOURCES)
LIBS = $(GTK_LIBS) \
$(GTHREAD_LIBS) \
$(PORTAUDIO_LIBS) \
$(FFTW_LIBS) \
-lpthread \
-lm
AM_CPPFLAGS = -DPROGRAM_NAME=\"tg-timer\" -DVERSION=\"$(PACKAGE_VERSION)\"
tg_timer_dbg_CPPFLAGS = $(AM_CPPFLAGS) -DDEBUG
AM_CFLAGS = $(GTK_CFLAGS) \
$(GTHREAD_CFLAGS) \
$(PORTAUDIO_CFLAGS) \
$(FFTW_CFLAGS)
tg_timer_dbg_CFLAGS = $(AM_CFLAGS) -ggdb
tg_timer_prf_CFLAGS = $(AM_CFLAGS) -pg
tg_timer_vlg_CFLAGS = $(AM_CFLAGS) -g
desktopdir = $(datadir)/applications
desktop_DATA = icons/tg-timer.desktop
dist_man_MANS = docs/tg-timer.1
xdgdatadir = @XDGDATADIR@
mimedir = $(xdgdatadir)/mime
xmldir = $(mimedir)/packages
xml_DATA = icons/tg-timer.xml
EXTRA_DIST := autogen.sh \
icons \
packaging
test: tg-timer-dbg
./tg-timer-dbg test
.PHONY: test
tg-timer.res: icons/tg-timer.rc icons/tg-timer.ico
windres icons/tg-timer.rc -O coff -o $@
valgrind: tg-timer-vlg
valgrind --leak-check=full -v --num-callers=99 --suppressions=.valgrind.supp ./$^
.PHONY: valgrind

View file

@ -49,6 +49,20 @@ The source code of tg can probably be built by any C99 compiler, however
only gcc and clang have been tested. You need the following libraries:
gtk+3, portaudio2, fftw3 (all available as open-source).
Release build:
```sh
git clone https://github.com/vacaboja/tg.git
cd tg
./autogen.sh
./configure
make
```
Debug build:
```sh
make tg-timer-dbg
```
### Compiling on Windows
It is suggested to use the msys2 platform. First install msys2 according
@ -65,9 +79,6 @@ issue the following commands.
To compile tg on Debian
sudo apt-get install libgtk-3-dev libjack-jackd2-dev portaudio19-dev libfftw3-dev git
git clone https://github.com/vacaboja/tg.git
cd tg
make
The package libjack-jackd2-dev is not necessary, it only works around a
known bug (https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=718221).
@ -77,6 +88,3 @@ known bug (https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=718221).
To compile tg on Fedora
sudo dnf install fftw-devel portaudio-devel gtk3-devel
git clone https://github.com/vacaboja/tg.git
cd tg
make

1580
autogen.sh Executable file

File diff suppressed because it is too large Load diff

2
build/.gitignore vendored
View file

@ -1,2 +0,0 @@
*
!.gitignore

13
configure.ac Normal file
View file

@ -0,0 +1,13 @@
AC_INIT([tg], [0.4.99], [mamino@lix.polytechnique.fr], [tg], [https://github.com/vacaboja/tg])
AM_INIT_AUTOMAKE([foreign subdir-objects])
AC_PROG_CC
AC_CHECK_LIB([pthread], [pthread_mutex_init], [], [AC_MSG_ERROR([pthread not found])])
AC_CHECK_LIB([m], [sqrt], [], [AC_MSG_ERROR([libm not found])])
PKG_CHECK_MODULES([GTK], [gtk+-3.0 glib-2.0])
PKG_CHECK_MODULES([PORTAUDIO], [portaudio-2.0])
PKG_CHECK_MODULES([FFTW], [fftw3f])
AM_CONDITIONAL(HAVE_WINDRES, which windres >/dev/null)
AC_OUTPUT([Makefile icons/Makefile])

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 989 B

View file

Before

Width:  |  Height:  |  Size: 708 B

After

Width:  |  Height:  |  Size: 708 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 987 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 35 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 25 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 38 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6 KiB

19
icons/Makefile.am Normal file
View file

@ -0,0 +1,19 @@
iconsdir = $(datadir)/icons/hicolor
nobase_dist_icons_DATA = \
16x16/apps/tg-timer.png \
22x22/apps/tg-timer.png \
32x32/apps/tg-timer.png \
48x48/apps/tg-timer.png \
64x64/apps/tg-timer.png \
128x128/apps/tg-timer.png \
256x256/apps/tg-timer.png \
scalable/apps/tg-timer.svg \
16x16/mimetypes/application-x-tg-timer-data.png \
22x22/mimetypes/application-x-tg-timer-data.png \
32x32/mimetypes/application-x-tg-timer-data.png \
48x48/mimetypes/application-x-tg-timer-data.png \
64x64/mimetypes/application-x-tg-timer-data.png \
128x128/mimetypes/application-x-tg-timer-data.png \
256x256/mimetypes/application-x-tg-timer-data.png \
scalable/mimetypes/application-x-tg-timer-data.svg

View file

@ -2,10 +2,10 @@
for A in `cat sizes`;
do
if test ! -d $[A]x$[A]
then
mkdir $[A]x$[A]
fi
inkscape -z -e $[A]x$[A]/tg-timer.png -w $A -h $A scalable/tg-timer.svg
inkscape -z -e $[A]x$[A]/tg-document.png -w $A -h $A scalable/tg-document.svg
mkdir -p ${A}x${A}/apps
mkdir -p ${A}x${A}/mimetypes
inkscape -z -e ${A}x${A}/apps/tg-timer.png -w $A -h $A scalable/apps/tg-timer.svg &>/dev/null
optipng -quiet ${A}x${A}/apps/tg-timer.png
inkscape -z -e ${A}x${A}/mimetypes/application-x-tg-timer-data.png -w $A -h $A scalable/application-x-tg-timer-data.svg &>/dev/null
optipng -quiet ${A}x${A}/mimetypes/application-x-tg-timer-data.png
done

View file

@ -2,10 +2,10 @@
SIZES=`cat sizes`
PNGS=`for A in $SIZES; do echo $[A]x$[A]/tg-timer.png; done`
PNGS=`for A in $SIZES; do echo ${A}x${A}/apps/tg-timer.png; done`
icotool -c -o tg-timer.ico $PNGS
PNGS=`for A in $SIZES; do echo $[A]x$[A]/tg-document.png; done`
PNGS=`for A in $SIZES; do echo ${A}x${A}/mimetypes/application-x-tg-timer-data.png; done`
icotool -c -o tg-document.ico $PNGS

View file

Before

Width:  |  Height:  |  Size: 15 KiB

After

Width:  |  Height:  |  Size: 15 KiB

View file

Before

Width:  |  Height:  |  Size: 13 KiB

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 363 KiB

After

Width:  |  Height:  |  Size: 363 KiB