Permalink
Browse files

Cleanup install script & makefile

  • Loading branch information...
1 parent 9900d00 commit f1d6ad097a34ff5d74410b5ad119302ae00b0960 @ryanflannery committed Sep 23, 2012
Showing with 183 additions and 137 deletions.
  1. +13 −13 Makefile
  2. +7 −0 compat.h
  3. +27 −45 config.mk
  4. +135 −78 configure.sh
  5. +1 −1 playlist.c
View
@@ -1,31 +1,31 @@
include config.mk
-# install locations (these are normally overriden by config.mk & configure.sh)
-PREFIX ?= /usr/local
-BINDIR ?= $(PREFIX)/bin
-MANDIR ?= $(PREFIX)/man/man1
+# install locations -- OVERRIDEN by config.mk
+PREFIX?=/usr/local
+BINDIR?=$(PREFIX)/bin
+MANDIR?=$(PREFIX)/man/man1
-# non-base dependencies (TagLib)
-TAGLIB_CFLAGS ?= `taglib-config --cflags`
-TAGLIB_LDFLAGS ?= `taglib-config --libs` -ltag_c
+# non-base dependencies (TagLib) -- OVERRIDEN by config.mk
+TAGLIB_CFLAGS ?=`taglib-config --cflags`
+TAGLIB_LDFLAGS ?=`taglib-config --libs` -ltag_c
# combine all dependencies (from taglib & config.mk)
-CFLAGS_DEPS = $(TAGLIB_CFLAGS) $(GSTREAMER_CFLAGS)
-LDFLAGS_DEPS = $(TAGLIB_LDFLAGS) $(GSTREAMER_LDFLAGS)
-OBJ_DEPS = $(GSTREAMER_OBJS)
+CDEPS=$(TAGLIB_CFLAGS) $(GSTREAMER_CFLAGS)
+LDEPS=$(TAGLIB_LDFLAGS) $(GSTREAMER_LDFLAGS)
+ODEPS=$(GSTREAMER_OBJS)
# build variables
CC ?= /usr/bin/cc
-CFLAGS += -c -std=c89 -Wall -Wextra -Wno-unused-value $(CDEBUG) $(CFLAGS_DEPS)
-LDFLAGS += -lm -lncursesw -lutil $(LDFLAGS_DEPS)
+CFLAGS += -c -std=c89 -Wall -Wextra -Wno-unused-value $(CDEBUG) $(CDEPS)
+LDFLAGS += -lm -lncurses -lutil $(LDEPS)
# object files
OBJS=commands.o compat.o e_commands.o \
keybindings.o medialib.o meta_info.o \
mplayer.o paint.o player.o player_utils.o \
playlist.o socket.o str2argv.o \
uinterface.o vitunes.o \
- $(OBJ_DEPS)
+ $(ODEPS)
# subdirectories with code (.PATH for BSD make, VPATH for GNU make)
.PATH: players
View
@@ -51,9 +51,16 @@
# include <libgen.h>
#endif
+/* Mac OS X has fparseln(3), but it must be included thusly */
+#if defined(__MACH__)
+# include <stdio.h>
+# include <util.h>
+#endif
+
/* Mac OS X needs strtonum(3) */
#if defined(__APPLE__) && defined(__MACH__)
# define COMPAT_NEED_STRTONUM
+# include <libgen.h>
#endif
/* Linux needs the following.. */
View
@@ -1,45 +1,27 @@
-### This is the default Makefile configuration for vitunes.
-### The contents of this file are normally set by the configure.sh script.
-### If you are seeing this text, then that script has *not* been run.
-###
-### This file controls:
-### 1. Where vitunes is installed (see PREFIX, BINDER, and MANDIR below)
-### 2. What capability vitunes will be compiled with (e.g. will gstreamer
-### support be included? what will be the default media backend?)
-###
-### The configure.sh script, when run, will replace the contents of this
-### file with what it detects to be most appropriate, based on your
-### operating system and what is installed.
-###
-### The default contents of this file may not be suited to your OS & setup.
-### Please run the configure.sh script.
-
-
-#######################################################################
-### Install Locations. These control where vitunes is installed.
-### Defaults are fine for Open/Free/Net BSD.
-#######################################################################
-
-PREFIX = /usr/local
-BINDIR = $(PREFIX)/bin
-MANDIR = $(PREFIX)/man/man1
-
-
-#######################################################################
-### TagLib configuration. TagLib is required to build and run vitunes.
-### Defaults should be fine as long as TagLib is installed.
-#######################################################################
-TAGLIB_CFLAGS = `pkg-config taglib --cflags`
-TAGLIB_LDFLAGS = `pkg-config taglib --libs` -ltag_c
-
-
-#######################################################################
-### Defaults should be fine as long as gstreamer is installed.
-#######################################################################
-
-GSTREAMER_CFLAGS = `pkg-config gstreamer-0.10 --cflags` -DENABLE_GSTREAMER
-GSTREAMER_LDFLAGS = `pkg-config gstreamer-0.10 --libs` -ltag_c
-GSTREAMER_OBJS = gstplayer.o
-
-
-### eof
+# This file was generated by the 'configure.sh' script on 2012-09-23 at 00:06:45.
+# Its contents should probably not be modified directly (if they should,
+# please contact the vitunes developers and let them know why).
+#
+# Generated on: 2012-09-23 at 00:06:45
+# Run on OS: Darwin schlipf.local 12.2.0 Darwin Kernel Version 12.2.0: Sat Aug 25 00:48:52 PDT 2012; root:xnu-2050.18.24~1/RELEASE_X86_64 x86_64
+
+
+# Install Locations
+PREFIX?=/usr/local
+BINDIR?=/usr/local/bin
+MANDIR?=/usr/local/man/man1
+
+
+# TagLib (empty if TagLib wasn't found)
+
+# taglib library detected by taglib-config
+TAGLIB_CFLAGS?=`taglib-config --cflags`
+TAGLIB_LDFLAGS?=`taglib-config --libs` -ltag_c
+
+
+
+# gstreamer (empty if gstreamer wasn't found)
+
+
+
+# configure.sh output ending
Oops, something went wrong.

0 comments on commit f1d6ad0

Please sign in to comment.