changeset 1203:a09393433f83 trunk

[svn] - OMKize Makefile (examples not installed yet) - fix a warning
author nenolod
date Wed, 14 Jun 2006 00:00:37 -0700
parents 4122a358d1b6
children 76e6b66fb859
files ChangeLog audtool/Makefile.in audtool/audtool.c
diffstat 3 files changed, 39 insertions(+), 45 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Tue Jun 13 23:57:16 2006 -0700
+++ b/ChangeLog	Wed Jun 14 00:00:37 2006 -0700
@@ -1,3 +1,11 @@
+2006-06-14 06:57:16 +0000  William Pitcock <nenolod@nenolod.net>
+  revision [1318]
+  - temporal: copy the original Makefile as a template for OMKizing.
+  
+
+  Changes:        Modified:
+
+
 2006-06-14 06:56:06 +0000  William Pitcock <nenolod@nenolod.net>
   revision [1316]
   - remove build environment
--- a/audtool/Makefile.in	Tue Jun 13 23:57:16 2006 -0700
+++ b/audtool/Makefile.in	Wed Jun 14 00:00:37 2006 -0700
@@ -1,43 +1,29 @@
-CC		= @CC@
-RM		= @RM@
-MV		= @MV@
-CP		= @CP@
-INSTALL		= @INSTALL@
-PREFIX		= @prefix@
-BIN		= audtool
-LDFLAGS		= @LDFLAGS@
-CPPFLAGS	= @CPPFLAGS@
+include ../mk/rules.mk
+include ../mk/objective.mk
+
+beepincludedir = $(includedir)/audacious
+
+OBJECTIVE_BINS = audtool
 
-# enforce -pthread on systems for now, some systems seem not to pick
-# it up automatically. --nenolod
-LIBS		= -pthread @LIBS@ @AUDACIOUS_LIBS@
-CFLAGS		= -pthread @CFLAGS@ @AUDACIOUS_CFLAGS@
-
-default: all
-
-BASE_SRCS = audtool.c
-
-SRCS = ${BASE_SRCS}
+LDFLAGS += -Wl,-export-dynamic
+LDADD = \
+	$(GTK_LIBS)      \
+	$(LIBGLADE_LIBS) \
+	-L.. $(LTLIBINTL)     \
+	-L../libaudacious -laudacious
 
-OBJS = ${SRCS:.c=.o}
-
-all: audtool
-
-build: all
-
-audtool: $(OBJS)
-	${CC} ${CFLAGS} -o $@ ${OBJS} ${LIBS}
+CFLAGS += \
+	$(GTK_CFLAGS)      \
+	$(LIBGLADE_CFLAGS) \
+	$(BEEP_DEFINES)    \
+	$(ARCH_DEFINES)    \
+	-I..    \
+	-I../intl
 
-install:
-	$(INSTALL) -m 755 -d $(DESTDIR)$(PREFIX)
-	$(INSTALL) -m 755 -d $(DESTDIR)$(PREFIX)/bin
-	$(INSTALL) -m 755 -c $(BIN) $(DESTDIR)$(PREFIX)/bin
+SOURCES = audtool.c
+
+OBJECTS = ${SOURCES:.c=.o}
 
-.c.o:
-	${CC} ${CPPFLAGS} ${CFLAGS} -c $< -o $@
-
-clean:
-	${RM} -f *.o audtool.core core audtool
-
-distclean: clean
-	${RM} -f Makefile config.h config.status config.log
+audtool: $(OBJECTS)
+	$(CC) $(LDFLAGS) $(OBJECTS) $(LDADD) -o $@ -Wl,-rpath,${libdir}
+	@printf "%10s     %-20s\n" LINK $@
--- a/audtool/audtool.c	Tue Jun 13 23:57:16 2006 -0700
+++ b/audtool/audtool.c	Wed Jun 14 00:00:37 2006 -0700
@@ -96,8 +96,8 @@
 		exit(0);
 	}
 
-	if (!xmms_remote_is_running(0) && strcasecmp("help", argv[1])
-		&& strcasecmp("list-handlers", argv[1]))
+	if (!xmms_remote_is_running(0) && g_strcasecmp("help", argv[1])
+		&& g_strcasecmp("list-handlers", argv[1]))
 	{
 		g_print("%s: audacious server is not running!\n", argv[0]);
 		exit(0);
@@ -105,9 +105,9 @@
 
 	for (i = 0; handlers[i].name != NULL; i++)
 	{
-		if ((!strcasecmp(handlers[i].name, argv[1]) ||
-		     !strcasecmp(g_strconcat("--", handlers[i].name, NULL), argv[1]))
-		    && strcasecmp("<sep>", handlers[i].name))
+		if ((!g_strcasecmp(handlers[i].name, argv[1]) ||
+		     !g_strcasecmp(g_strconcat("--", handlers[i].name, NULL), argv[1]))
+		    && g_strcasecmp("<sep>", handlers[i].name))
   		{
  			handlers[i].handler(0, argc, argv);
 			exit(0);
@@ -775,7 +775,7 @@
 
 	for (i = 0; handlers[i].name != NULL; i++)
 	{
-		if (!strcasecmp("<sep>", handlers[i].name))
+		if (!g_strcasecmp("<sep>", handlers[i].name))
 			g_print("\n");
 		else
 			g_print("   %-34s - %s\n", handlers[i].name, handlers[i].desc);