From a9be92f7b81976fd833c82285a742be9fc9129d5 Mon Sep 17 00:00:00 2001 From: Joe Date: Mon, 27 Jun 2022 22:12:42 +0200 Subject: WIP --- Makefile | 5 ++++- src/c_mpdview.c | 12 ++++++++++-- 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 0495d56..f4dea37 100644 --- a/Makefile +++ b/Makefile @@ -45,6 +45,9 @@ CFLAGS += -pedantic CFLAGS += -isystem/usr/local/include # CFLAGS += -march=native -O2 -pipe +LDFLAGS := -L/usr/local/lib +LDFLAGS += -lmpd + RM := rm -f MKDIR := mkdir -p SED := sed -i '' @@ -59,7 +62,7 @@ INSTALL := install ${CC} -c ${CFLAGS} -o ${.TARGET} ${.IMPSRC} ${NAME}: ${OBJS} - ${CC} ${CFLAGS} -o ${.TARGET} ${.ALLSRC} + ${CC} ${CFLAGS} -o ${.TARGET} ${.ALLSRC} ${LDFLAGS} all: ${OBJS_DIR} ${NAME} diff --git a/src/c_mpdview.c b/src/c_mpdview.c index b163e42..e927f8b 100644 --- a/src/c_mpdview.c +++ b/src/c_mpdview.c @@ -45,10 +45,12 @@ * This is the entrypoint of the program. */ +#include #include #include #include +#include int main @@ -56,9 +58,15 @@ main const char* argv[], const char* envp[]) { + struct mpd_connection* conn; + + conn = mpd_connection_new("localhost", 6600, 3000); + if (conn == NULL) { + return (EXIT_FAILURE); + } + (void)conn; (void)argc; (void)argv; (void)envp; - - return (0); + return (EXIT_SUCCESS); } -- cgit v1.2.3