Skip to content

Commit

Permalink
Merge pull request #6 from Pyrohh/pkg-config
Browse files Browse the repository at this point in the history
Use pkg-config + small change
  • Loading branch information
Gottox committed Jun 20, 2015
2 parents 9079f07 + 1ab6382 commit 6e82851
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 11 deletions.
3 changes: 2 additions & 1 deletion bgs.c
Original file line number Diff line number Diff line change
Expand Up @@ -238,8 +238,9 @@ main(int argc, char *argv[]) {
case 'R':
rotate = False; break;
case 'v':
die("bgs-"VERSION", © 2010 bgs engineers, see"
printf("bgs-"VERSION", © 2010 bgs engineers, see "
"LICENSE for details\n");
return 0;
case 'x':
running = True; break;
case 'z':
Expand Down
15 changes: 5 additions & 10 deletions config.mk
Original file line number Diff line number Diff line change
Expand Up @@ -7,22 +7,17 @@ VERSION = 0.7.1
PREFIX = /usr/local
MANPREFIX = ${PREFIX}/share/man

X11INC = /usr/X11R6/include
X11LIB = /usr/X11R6/lib

IMLIB2INC = /usr/include/imlib2
IMLIB2LIB = /usr/lib/imlib2/

# Xinerama, comment if you don't want it
XINERAMALIBS = -L${X11LIB} -lXinerama
XINERAMALIBS = -lXinerama
XINERAMAFLAGS = -DXINERAMA

# includes and libs
INCS = -I${X11INC} -I ${IMLIB2INC}
LIBS = -lm -L${X11LIB} -lX11 ${XINERAMALIBS} -L${IMLIB2LIB} -lImlib2 -lm
INCS = `pkg-config --cflags imlib2`
LIBS = `pkg-config --libs imlib2` ${XINERAMALIBS}

# flags
CFLAGS += -std=c99 -pedantic -Wall ${INCS} -DVERSION=\"${VERSION}\" ${XINERAMAFLAGS}
CPPFLAGS += -DVERSION=\"${VERSION}\" ${XINERAMAFLAGS}
CFLAGS += -std=c99 -pedantic -Wall ${INCS} ${CPPFLAGS}
LDFLAGS += ${LIBS}

# compiler and linker
Expand Down

0 comments on commit 6e82851

Please sign in to comment.