[hackers] [wmii] Use pkg-config globally. || Kris Maglione

From: <hg_AT_suckless.org>
Date: Thu, 21 May 2009 18:23:01 +0000 (UTC)

changeset: 2459:f529bf0b3cce
tag: tip
user: Kris Maglione <jg_AT_suckless.org>
date: Thu May 21 14:22:58 2009 -0400
files: cmd/Makefile cmd/click/Makefile cmd/menu/Makefile cmd/strut/Makefile cmd/wmii/Makefile config.mk mk/hdr.mk
description:
Use pkg-config globally.

diff -r f4cd1cc8e757 -r f529bf0b3cce cmd/Makefile
--- a/cmd/Makefile Thu May 21 13:55:34 2009 -0400
+++ b/cmd/Makefile Thu May 21 14:22:58 2009 -0400
@@ -37,5 +37,5 @@
 
 O9MENU=wmii9menu.o clientutil.o wmii/x11.o wmii/map.o $(OFILES) $(LIBIXP)
 wmii9menu.O: $(O9MENU)
- $(LINK) $@ $(O9MENU) $(LIBX11) -lXext -lbio
+ $(LINK) $@ $(O9MENU) $$(pkg-config --libs $(X11PACKAGES)) -lXext -lbio
 
diff -r f4cd1cc8e757 -r f529bf0b3cce cmd/click/Makefile
--- a/cmd/click/Makefile Thu May 21 13:55:34 2009 -0400
+++ b/cmd/click/Makefile Thu May 21 14:22:58 2009 -0400
@@ -7,10 +7,11 @@
 TARG = click
 HFILES= dat.h fns.h
 
-LIB = ${LIBIXP}
-LDFLAGS += -lm ${LIBX11} -lXext -lXtst -lregexp9 -lbio -lfmt -lutf
-CFLAGS += ${INCX11} -DVERSION=\"${VERSION}\" \
- -DIXP_NEEDAPI=86
+PACKAGES += $(X11PACKAGES) xext xrandr xrender xinerama
+
+LIB = $(LIBIXP)
+LDFLAGS += -lm -lXtst -lregexp9 -lbio -lfmt -lutf
+CFLAGS += -DVERSION=\"$(VERSION)\" -DIXP_NEEDAPI=86
 OBJ = main \
         _util \
         ../wmii/map \
diff -r f4cd1cc8e757 -r f529bf0b3cce cmd/menu/Makefile
--- a/cmd/menu/Makefile Thu May 21 13:55:34 2009 -0400
+++ b/cmd/menu/Makefile Thu May 21 14:22:58 2009 -0400
@@ -12,11 +12,11 @@
 TARG = wimenu
 HFILES= dat.h fns.h
 
+PACKAGES += $(X11PACKAGES) xext xrandr xrender xinerama
+
 LIB = $(LIBIXP)
-LDFLAGS += -lm $(LIBX11) -lXext -lXrandr -LXrender -lXinerama \
- -lregexp9 -lbio -lfmt -lutf
-CFLAGS += $(INCX11) -DVERSION=\"$(VERSION)\" \
- -DIXP_NEEDAPI=86
+LDFLAGS += -lm -lregexp9 -lbio -lfmt -lutf
+CFLAGS += -DVERSION=\"$(VERSION)\" -DIXP_NEEDAPI=86
 OBJ = main \
         caret \
         history \
diff -r f4cd1cc8e757 -r f529bf0b3cce cmd/strut/Makefile
--- a/cmd/strut/Makefile Thu May 21 13:55:34 2009 -0400
+++ b/cmd/strut/Makefile Thu May 21 14:22:58 2009 -0400
@@ -7,10 +7,11 @@
 TARG = wistrut
 HFILES= dat.h fns.h
 
-LIB = ${LIBIXP}
-LDFLAGS += -lm ${LIBX11} -lXext -lXrandr -lregexp9 -lbio -lfmt -lutf
-CFLAGS += ${INCX11} -DVERSION=\"${VERSION}\" \
- -DIXP_NEEDAPI=86
+PACKAGES += $(X11PACKAGES) xext xrandr xinerama
+
+LIB = $(LIBIXP)
+LDFLAGS += -lm -lregexp9 -lbio -lfmt -lutf
+CFLAGS += -DVERSION=\"$(VERSION)\" -DIXP_NEEDAPI=86
 OBJ = main \
         event \
         ewmh \
diff -r f4cd1cc8e757 -r f529bf0b3cce cmd/wmii/Makefile
--- a/cmd/wmii/Makefile Thu May 21 13:55:34 2009 -0400
+++ b/cmd/wmii/Makefile Thu May 21 14:22:58 2009 -0400
@@ -7,11 +7,12 @@
 TARG = wmii
 HFILES= dat.h fns.h
 
+PACKAGES += $(X11PACKAGES) xext xrandr xrender xinerama
+
 LIB = $(LIBIXP)
-LDFLAGS += -lm $(LIBX11) -lXext -lXrandr -lXrender -lXinerama \
- $(LIBICONV) -lregexp9 -lbio -lfmt -lutf
+LDFLAGS += -lm $(LIBICONV) -lregexp9 -lbio -lfmt -lutf
 
-CFLAGS += $(INCX11) $(INCICONV) -DVERSION=\"$(VERSION)\" \
+CFLAGS += $(INCICONV) -DVERSION=\"$(VERSION)\" \
           -DIXP_NEEDAPI=97
 OBJ = area \
         bar \
diff -r f4cd1cc8e757 -r f529bf0b3cce config.mk
--- a/config.mk Thu May 21 13:55:34 2009 -0400
+++ b/config.mk Thu May 21 14:22:58 2009 -0400
@@ -33,8 +33,8 @@
 # are painfully slow, and should be avoided.
 #BINSH = /bin/ash
 
-INCX11 = $$(pkg-config --cflags xft)
-LIBX11 = $$(pkg-config --libs xft)
+X11PACKAGES = xft
+INCX11 = $$(pkg-config --cflags $(X11PACKAGES))
 LIBICONV = # Leave blank if your libc includes iconv (glibc does)
 LIBIXP = $(LIBDIR)/libixp.a
 
diff -r f4cd1cc8e757 -r f529bf0b3cce mk/hdr.mk
--- a/mk/hdr.mk Thu May 21 13:55:34 2009 -0400
+++ b/mk/hdr.mk Thu May 21 14:22:58 2009 -0400
@@ -1,11 +1,13 @@
 FILTER = cat
 EXCFLAGS = -I$$(echo $(INCPATH)|sed 's/:/ -I/g') -D_XOPEN_SOURCE=600
-COMPILE= CC="$(CC)" CFLAGS="$(EXCFLAGS) $(CFLAGS)" $(ROOT)/util/compile
-COMPILEPIC= CC="$(CC)" CFLAGS="$(EXCFLAGS) $(CFLAGS) $(SOCFLAGS)" $(ROOT)/util/compile
-LINK= LD="$(LD)" LDFLAGS="$(LDFLAGS)" $(ROOT)/util/link
-LINKSO= LD="$(LD)" LDFLAGS="$(SOLDFLAGS) $(SHARED)" $(ROOT)/util/link
+COMPILE= CC="$(CC)" CFLAGS="$(EXCFLAGS) $(CFLAGS) $$(pkg-config --cflags $(PACKAGES))" $(ROOT)/util/compile
+COMPILEPIC= CC="$(CC)" CFLAGS="$(EXCFLAGS) $(CFLAGS) $$(pkg-config --cflags $(PACKAGES)) $(SOCFLAGS)" $(ROOT)/util/compile
+LINK= LD="$(LD)" LDFLAGS="$(LDFLAGS) $$(pkg-config --libs $(PACKAGES))" $(ROOT)/util/link
+LINKSO= LD="$(LD)" LDFLAGS="$(SOLDFLAGS) $(SHARED) $$(pkg-config --libs $(PACKAGES))" $(ROOT)/util/link
 CLEANNAME=$(ROOT)/util/cleanname
 SOEXT=so
+
+PACKAGES = 2>/dev/null
 
 include $(ROOT)/config.mk
 
Received on Thu May 21 2009 - 18:23:01 UTC

This archive was generated by hypermail 2.2.0 : Thu May 21 2009 - 18:24:05 UTC