wmix: Use autotools for build.

This commit is contained in:
Doug Torrance 2017-09-28 23:21:44 -04:00 committed by Carlos R. Mafra
parent 11ce862a69
commit c10bfd74a2
5 changed files with 29 additions and 27 deletions

View file

@ -1,9 +1,10 @@
Since your reading this, you are probably done with the tar zxvf part.
1. make
2. become root
3. make install
4. wmix
1. ./configure
2. make
3. become root
4. make install
5. wmix
pretty easy. See README for instructions on how to use the mixer and about
some information on the programming involved. See the man page (man wmix)

View file

@ -1,20 +0,0 @@
CC = gcc
CFLAGS = -std=gnu99 -O3 -W -Wall `pkg-config --cflags alsa xrandr`
LDFLAGS = -L/usr/X11R6/lib
LIBS = -lXpm -lXext -lX11 -lm `pkg-config --libs alsa xrandr`
OBJECTS = misc.o config.o mixer-alsa.o mixer-oss.o ui_x.o mmkeys.o wmix.o
# where to install this program (also for packaging stuff)
PREFIX = /usr/local
INSTALL_BIN = -m 755
INSTALL_DATA = -m 644
wmix: $(OBJECTS)
$(CC) -o $@ $(LDFLAGS) $(OBJECTS) $(LIBS)
clean:
rm -rf *.o wmix *~
install: wmix
install $(INSTALL_BIN) wmix $(PREFIX)/bin
install $(INSTALL_DATA) wmix.1x $(PREFIX)/man/man1

9
wmix/Makefile.am Normal file
View file

@ -0,0 +1,9 @@
bin_PROGRAMS = wmix
wmix_SOURCES = misc.c config.c mixer-alsa.c mixer-oss.c ui_x.c mmkeys.c wmix.c \
include/common.h include/config.h include/led-off.xpm \
include/led-on.xpm include/master.xpm include/misc.h \
include/mixer-alsa.h include/mixer.h include/mixer-oss.h \
include/mmkeys.h include/ui_x.h
dist_man_MANS = wmix.1x
EXTRA_DIST = BUGS sample.wmixrc

15
wmix/configure.ac Normal file
View file

@ -0,0 +1,15 @@
AC_INIT([wmix], [3.2], [wmaker-dev@lists.windowmaker.org])
AM_INIT_AUTOMAKE([foreign])
AC_CONFIG_SRCDIR([wmix.c])
AC_PROG_CC
AC_CHECK_LIB([asound], [snd_mixer_selem_get_playback_switch])
AC_CHECK_LIB([m], [cos])
AC_CHECK_LIB([X11], [XOpenDisplay])
AC_CHECK_LIB([Xext], [XShapeCombineMask])
AC_CHECK_LIB([Xpm], [XpmCreatePixmapFromData])
AC_CHECK_LIB([Xrandr], [XRRQueryExtension])
AC_CONFIG_FILES([Makefile])
AC_OUTPUT

View file

@ -49,9 +49,6 @@ extern struct _Config {
/* Default color for OSD */
extern const char default_osd_color[];
/* Current version of WMixer */
#define VERSION "3.2"
/* Sets the default values in the config */
void config_init(void);