Commit 02f2477f authored by Lucas Russo's avatar Lucas Russo

Makefile: add revision and kernel targets

Now, the revision file gets compiled with everything
else and the PCIe kernel driver also gets installed prior
to compiling the HAL layer
parent 8b760801
......@@ -70,29 +70,28 @@ OUT = $(hal_OUT)
# Save a git repository description
#REVISION = $(shell git describe --dirty --always)
#REVISION_NAME = revision
#OBJ_REVISION = $(addsuffix .o, $(REVISION_NAME))
REVISION = $(shell git describe --dirty --always)
REVISION_NAME = revision
OBJ_REVISION = $(addsuffix .o, $(REVISION_NAME))
OBJS_all = $(hal_OBJS) $(OBJ_REVISION)
.PHONY: all kernel_check clean mrproper install uninstall tests examples
.PHONY: all kernel_install kernel_check \
clean mrproper install uninstall \
tests examples
# Avoid deletion of intermediate files, such as objects
# Makefile rules
all: kernel_check $(OUT)
all: kernel_install $(OUT)
# Output Rule
$(OUT): $$($$@_OBJS)
$(OUT): $$($$@_OBJS) $(REVISION_NAME).o
#$(SIZE) $@
# $(SIZE) -t $@
# Pull in dependency info for *existing* .o files and don't complain if the
# corresponding .d file is not found
......@@ -125,8 +124,10 @@ $(OUT): $$($$@_OBJS)
@rm -f $*.d.tmp
# Check for libraries and issue warning!!!
# $(MAKE) -C $(KERNEL_DIR) all
$(MAKE) -C $(KERNEL_DIR) all
kernel_install: kernel_check
$(MAKE) -C $(KERNEL_DIR) install
$(MAKE) -C $@ all
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