Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OTHER: #include <stdio.h> for fprintf #2

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 14 additions & 13 deletions c/Makefile
Original file line number Diff line number Diff line change
@@ -1,23 +1,24 @@
LIBS=`pkg-config --libs xmms2-client`
GLIB=`pkg-config --libs xmms2-client-glib` `pkg-config --libs glib-2.0`
CFLAGS_XMMS2=`pkg-config --cflags xmms2-client`
CFLAGS_GLIB=`pkg-config --cflags glib-2.0`
LIBS_XMMS2=`pkg-config --libs xmms2-client`
LIBS_GLIB=`pkg-config --libs xmms2-client-glib` `pkg-config --libs glib-2.0`

all: tut1 tut2 tut3 tut4 tut5 tut6 tut7 tut8
all: xmms2 xmms2glib

xmms2: CFLAGS=$(CFLAGS_XMMS2)
xmms2: LIBS=$(LIBS_XMMS2)
xmms2: tut1 tut2 tut3 tut4 tut5

xmms2glib: CFLAGS=$(CFLAGS_XMMS2) $(CFLAGS_GLIB)
xmms2glib: LIBS=$(LIBS_XMMS2) $(LIBS_GLIB)
xmms2glib: tut6 tut7 tut8

%.o: %.c
gcc `pkg-config --cflags xmms2-client glib-2.0` -Wall -c -o $@ $<
gcc $(CFLAGS) -Wall -c -o $@ $<

tut%: tut%.o
gcc -o $@ $< $(LIBS)

tut6: tut6.o
gcc -o $@ $< $(LIBS) $(GLIB)

tut7: tut7.o
gcc -o $@ $< $(LIBS) $(GLIB)

tut8: tut8.o
gcc -o $@ $< $(LIBS) $(GLIB)

clean:
rm -f tut? *.o

1 change: 1 addition & 0 deletions c/tut1.c
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
*/

#include <stdlib.h>
#include <stdio.h>

/* include xmmsclient header */
#include <xmmsclient/xmmsclient.h>
Expand Down
1 change: 1 addition & 0 deletions c/tut2.c
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
*/

#include <stdlib.h>
#include <stdio.h>

/* include xmmsclient header */
#include <xmmsclient/xmmsclient.h>
Expand Down
1 change: 1 addition & 0 deletions c/tut3.c
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
*/

#include <stdlib.h>
#include <stdio.h>

/* include xmmsclient header */
#include <xmmsclient/xmmsclient.h>
Expand Down
1 change: 1 addition & 0 deletions c/tut4.c
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
*/

#include <stdlib.h>
#include <stdio.h>

/* include xmmsclient header */
#include <xmmsclient/xmmsclient.h>
Expand Down
3 changes: 2 additions & 1 deletion c/tut5.c
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
*/

#include <stdlib.h>
#include <stdio.h>

/* include xmmsclient header */
#include <xmmsclient/xmmsclient.h>
Expand Down Expand Up @@ -131,7 +132,7 @@ main (int argc, char **argv)
* Values that we need later
*/

connection = xmmsc_init ("tutorial1");
connection = xmmsc_init ("tutorial5");
if (!connection) {
fprintf (stderr, "OOM!\n");
exit (EXIT_FAILURE);
Expand Down
3 changes: 2 additions & 1 deletion c/tut6.c
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
*/

#include <stdlib.h>
#include <stdio.h>

/* include xmmsclient header */
#include <xmmsclient/xmmsclient.h>
Expand Down Expand Up @@ -89,7 +90,7 @@ main (int argc, char **argv)
* normal. Read up on this in earlier
* tutorials if you need.
*/
connection = xmmsc_init ("tutorial6");
connection = xmmsc_init ("tutorial7");
if (!connection) {
fprintf (stderr, "OOM!\n");
exit (EXIT_FAILURE);
Expand Down
3 changes: 2 additions & 1 deletion c/tut7.c
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
*/

#include <stdlib.h>
#include <stdio.h>

/* include xmmsclient header */
#include <xmmsclient/xmmsclient.h>
Expand Down Expand Up @@ -113,7 +114,7 @@ main (int argc, char **argv)
* normal. Read up on this in earlier
* tutorials if you need.
*/
connection = xmmsc_init ("tutorial6");
connection = xmmsc_init ("tutorial8");
if (!connection) {
fprintf (stderr, "OOM!\n");
exit (EXIT_FAILURE);
Expand Down
1 change: 1 addition & 0 deletions c/tut8.c
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
*/

#include <stdlib.h>
#include <stdio.h>

/* include xmmsclient header */
#include <xmmsclient/xmmsclient.h>
Expand Down