changeset 566:ab7027a06ca9 trunk

[svn] convert mpg123 over... right now we don't use the "x86-optimized code", although I doubt it makes a lick of difference anyway...
author nenolod
date Thu, 02 Feb 2006 14:42:17 -0800
parents 87e674b24bf8
children 2ed2993cd920
files Plugins/Input/mpg123/Makefile.am Plugins/Input/mpg123/Makefile.in mk/objective.mk
diffstat 3 files changed, 32 insertions(+), 42 deletions(-) [+]
line wrap: on
line diff
--- a/Plugins/Input/mpg123/Makefile.am	Thu Feb 02 14:21:14 2006 -0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,34 +0,0 @@
-if ENABLE_MPG123
-
-lib_LTLIBRARIES = libmpg123.la
-
-endif
-
-libdir = $(plugindir)/$(INPUT_PLUGIN_DIR)
-
-COMMON_SRC = mpg123.c configure.c fileinfo.c common.c \
-decode_2to1.c decode_4to1.c \
-layer1.c layer2.c layer3.c \
-tabinit.c equalizer.c http.c \
-huffman.h mpg123.h l2tables.h getbits.h \
-dxhead.c dxhead.h \
-id3.c xmms-id3.h id3_frame.c id3_frame_content.c id3_frame_text.c \
-id3_frame_url.c id3_header.h id3_tag.c
-
-if ARCH_X86
-
-EXTRA_SRC = decode_i386.c dct64_i386.c
-
-else
-
-EXTRA_SRC = decode.c dct64.c
-
-endif # ARCH_X86
-
-EXTRA_DIST = decode.c decode_i386.c dct64_i386.c \
-             getbits.c dct64.c mp3.xpm
-
-libmpg123_la_SOURCES = $(COMMON_SRC) $(EXTRA_SRC)
-libmpg123_la_LDFLAGS = $(PLUGIN_LDFLAGS)
-libmpg123_la_LIBADD = $(ID3LIBS) $(GTK_LIBS) $(top_builddir)/libaudacious/libaudacious.la
-INCLUDES = $(GTK_CFLAGS) $(ARCH_DEFINES) -I$(top_srcdir)/intl -I$(top_srcdir)
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Plugins/Input/mpg123/Makefile.in	Thu Feb 02 14:42:17 2006 -0800
@@ -0,0 +1,19 @@
+include ../../../mk/rules.mk
+include ../../../mk/objective.mk
+
+OBJECTIVE_LIBS = libmpg123.so
+
+SOURCES = mpg123.c configure.c fileinfo.c common.c \
+	decode_2to1.c decode_4to1.c \
+	layer1.c layer2.c layer3.c \
+	tabinit.c equalizer.c http.c \
+	dxhead.c \
+	id3.c id3_frame.c id3_frame_content.c id3_frame_text.c \
+	id3_frame_url.c id3_tag.c decode.c dct64.c
+
+OBJECTS = ${SOURCES:.c=.o}
+
+CFLAGS += -fPIC -DPIC $(GTK_CFLAGS) $(ARCH_DEFINES) -I../../../intl -I../../..
+
+libmpg123.so: $(OBJECTS)
+	$(CC) $(CFLAGS) -shared $(OBJECTS) -o $@
--- a/mk/objective.mk	Thu Feb 02 14:21:14 2006 -0800
+++ b/mk/objective.mk	Thu Feb 02 14:42:17 2006 -0800
@@ -1,6 +1,9 @@
 # Shut up GNU make
 .SILENT:
 
+SUBDIRS = none
+CFLAGS += -DHAVE_CONFIG_H
+
 default: all
 all: build
 
@@ -35,10 +38,12 @@
 
 build:
 	$(MAKE) build-prehook
-	@for i in $(SUBDIRS); do \
-		echo "[building subobjective: $$i]"; \
-		cd $$i; $(MAKE); cd ..; \
-	done
+	@if test "$(SUBDIRS)" != "none"; then \
+		for i in $(SUBDIRS); do \
+			echo "[building subobjective: $$i]"; \
+			(cd $$i; $(MAKE); cd ..); \
+		done; \
+	fi
 	@for i in $(OBJECTIVE_LIBS); do \
 		$(MAKE) $$i; \
 	done
@@ -49,19 +54,19 @@
 	@echo "[all objectives built]"
 
 .c.o:
-	printf "%10s     %-20s\n" CC $$i;
+	printf "%10s     %-20s\n" CC $<
 	$(CC) $(CFLAGS) -c $< -o $@
 
 .cc.o:
-	printf "%10s     %-20s\n" CXX $$i;
+	printf "%10s     %-20s\n" CXX $<;
 	$(CXX) $(CXXFLAGS) -c $< -o $@
 
 .cpp.o:
-	printf "%10s     %-20s\n" CXX $$i;
+	printf "%10s     %-20s\n" CXX $<;
 	$(CXX) $(CXXFLAGS) -c $< -o $@
 
 .cxx.o:
-	printf "%10s     %-20s\n" CXX $$i;
+	printf "%10s     %-20s\n" CXX $<;
 	$(CXX) $(CXXFLAGS) -c $< -o $@
 
 clean-prehook: