From 61430f6b96e206dfa8f427035d33315c56ec97c9 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Kristian=20H=C3=B8gsberg?= Date: Tue, 19 Apr 2005 03:50:28 +0000 Subject: [PATCH] Add simple check target that runs a sanity check of the build environment. MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Tue Apr 19 23:26:45 2005 Kristian Høgsberg * Makefile (check): Add simple check target that runs a sanity check of the build environment. --- ChangeLog | 5 +++++ Makefile | 12 +++++++++--- 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index 094fdfe..9830252 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +Tue Apr 19 23:26:45 2005 Kristian Høgsberg + + * Makefile (check): Add simple check target that runs a sanity + check of the build environment. + Sun Apr 17 00:20:41 2005 Soeren Sandmann * sysprof.c (on_open_clicked): Factor out some stuff in their own diff --git a/Makefile b/Makefile index 4013c14..5f7fc2d 100644 --- a/Makefile +++ b/Makefile @@ -12,12 +12,18 @@ profile.c treeviewutils.c sfile.c OBJS := $(addsuffix .o, $(basename $(C_FILES))) BINARY := sysprof MODULE := sysprof-module -INCLUDE := -isystem /lib/modules/`uname -r`/build/include -MODCFLAGS := -O2 -DMODULE -D__KERNEL__ -Wall ${INCLUDE} KDIR := /lib/modules/$(shell uname -r)/build +INCLUDE := -isystem $(KDIR)/include +MODCFLAGS := -O2 -DMODULE -D__KERNEL__ -Wall ${INCLUDE} MODULE := sysprof-module -all: $(BINARY) $(MODULE).o +all: check $(BINARY) $(MODULE).o + +check: + pkg-config gtk+-2.0 libglade-2.0 + @[ -r $(KDIR)/include/linux/kernel.h ] || (echo No kernel headers found; exit 1) + @[ -r /usr/include/bzlib.h ] || (echo bzip2 header file not found; exit 1) + touch check $(BINARY): $(OBJS) depend $(CC) $(OBJS) $(LIBS) -o$(BINARY) -- 2.7.4