From: Juergen Beisert Date: Tue, 21 Jun 2011 09:27:25 +0200 Subject: [PATCH] Patches the Makefile to be able to cross compile The original makefile assumes fixed pathes to libraries and include files. This patch replace them with calls to pkg_config. Don't strip the binary. targetinstall will do this. Install to $(DESTDIR). Forwarded: not-needed (upstream dead) Signed-off-by: j.beisert@pengutronix.de Signed-off-by: Michael Olbrich --- Makefile | 19 ++++++++++--------- 1 files changed, 10 insertions(+), 9 deletions(-) diff --git a/Makefile b/Makefile index 9d20d90..28519a7 100644 --- a/Makefile +++ b/Makefile @@ -1,13 +1,14 @@ -CC=cc -CFLAGS= -O2 -I/usr/X11R6/include -DHAVE_XPM -DXFT -DCLOCK -LDFLAGS= -L/usr/X11R6/lib -lX11 -lXpm -lXft +.PHONY: install clean + +CFLAGS +=-O2 -g `pkg-config --cflags xft` `pkg-config --cflags xpm` -DCLOCK +LDLIBS +=`pkg-config --libs xft` `pkg-config --libs xpm` PROGNAME=hpanel -$(PROGNAME): Makefile hpanel.c hpanel.h icon.xpm - $(CC) $(CFLAGS) $(LDFLAGS) hpanel.c -o $(PROGNAME) - @ls -l $(PROGNAME) - strip $(PROGNAME) - @ls -l $(PROGNAME) +$(PROGNAME): hpanel.c install: - install $(PROGNAME) /usr/local/bin + install $(PROGNAME) $(DESTDIR)/usr/bin + +clean: + @rm -f $(PROGNAME) +