Commit c5983db2 authored by Federico Vaga's avatar Federico Vaga

Makefile: compile tools outside kbuild environment

Because their are not part of the module building but simple user space
application. To avoid confusion, do not use kbuild environment style
Signed-off-by: Federico Vaga's avatarFederico Vaga <federico.vaga@cern.ch>
Acked-by: Alessandro Rubini's avatarAlessandro Rubini <rubini@gnudd.com>
parent 980f80fd
......@@ -9,8 +9,6 @@ obj-m += drivers/
obj-m += buffers/
obj-m += triggers/
obj-m += tools/
GIT_VERSION = $(shell cd $(src); git describe --dirty --long --tags)
# WARNING: the line below doesn't work in-kernel if you compile with O=
......
# build user-space tools for zio
HOST_EXTRACFLAGS += -I$(M)/include/
CFLAGS = -I$(M)/include/ -Wall $(EXTRACFLAGS)
CC ?= $(CROSS_COMPILE)gcc
HOSTCC ?= gcc
hostprogs-y := zio-dump
hostprogs-y += zio-cat-file
hostprogs-y += test-dtc
progs := zio-dump
progs += zio-cat-file
progs += test-dtc
# The following is ugly, please forgive me by now
user: $(hostprogs-y)
user: $(progs)
clean:
rm -f $(hostprogs-y) *~ *.o
rm -f $(progs) *~ *.o
%: %.c
$(HOSTCC) $(HOST_EXTRACFLAGS) -Wall $^ -o $@
$(CC) $(CFLAGS) $^ -o $@
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment