--- cwm-20110726/Makefile +++ cwm-20110726/Makefile @@ -15,16 +15,14 @@ kbfunc.o mousefunc.o font.o strlcpy.o strlcat.o y.tab.o \ strtonum.o fgetln.o -X11BASE= /usr -CPPFLAGS+= -I${X11BASE}/include -I${X11BASE}/include/freetype2 -I. +CPPFLAGS+= $(shell pkg-config --cflags-only-I xft) -CFLAGS+= -Wall -O2 -g +CFLAGS+= -LDADD+= -L${X11BASE}/lib -lXft -lXrender -lX11 -lxcb -lXau -lXdmcp \ - -lfontconfig -lexpat -lfreetype -lz -lXinerama -lXrandr -lXext +LDADD+= $(shell pkg-config --libs xft xinerama xrandr ) -MANDIR= ${X11BASE}/man/man +MANDIR= /usr/share/man MAN= cwm.1 cwmrc.5 CLEANFILES= cwm.cat1 cwmrc.cat5 @@ -45,9 +43,9 @@ $(CC) -c $(CFLAGS) $(CPPFLAGS) $< install: ${PROG} - install -m 755 cwm /usr/local/bin/ - install -m 644 cwm.1 /usr/local/man/man1 - install -m 644 cwmrc.5 /usr/local/man/man5 + install -D -m 755 cwm $(DESTDIR)$(BINDIR)/cwm + install -D -m 644 cwm.1 $(DESTDIR)$(MANDIR)/man1/cwm.1 + install -D -m 644 cwmrc.5 $(DESTDIR)$(MANDIR)/man5/cwmrc.5 #.include #.include