# Makefile for Xenomai applications # Paulo Pedreiras, Jul/2013 # Adapted by Goncalo Pardal, Nov/2013 # - added -Xlinker -rpath -Xlinker /usr/xenomai/lib to Makefile to eliminate # issue related with user space libs incompatible with kernel space ones # Check if PATH is configured correctly prefix :=$(shell xeno-config --prefix) ifeq ($(prefix),) $(error Please add /bin to your PATH variable) endif # Get compiler and linker flags CC := $(shell xeno-config --cc) CFLAGS := $(shell xeno-config --skin=native --cflags) LDFLAGS := -lnative $(shell xeno-config --skin=native --ldflags) # Compile application periodic_task: periodic_task.c $(CC) -o $@ $< $(CFLAGS) $(LDFLAGS) -Xlinker -rpath -Xlinker /usr/xenomai/lib clean: rm periodic_task