Mercurial > hg > beaglert
diff Makefile @ 68:59edd5780fef
Changed d-box code to run cleanly when built on board. Updated Makefile to add ne10 include path on board. Some extra docs in Utilities.h
author | andrewm |
---|---|
date | Fri, 17 Jul 2015 16:57:08 +0100 |
parents | b89dd0c97a04 |
children | 272154649c46 |
line wrap: on
line diff
--- a/Makefile Fri Jul 17 15:28:18 2015 +0100 +++ b/Makefile Fri Jul 17 16:57:08 2015 +0100 @@ -10,6 +10,9 @@ STATIC_LIBS := ./libprussdrv.a ./libNE10.a LIBS := -lrt -lnative -lxenomai +INCLUDES := -I/usr/include/ne10 -I/usr/xenomai/include -I/usr/arm-linux-gnueabihf/include/xenomai/include -I/usr/arm-linux-gnueabihf/include/ne10 + + ASM_SRCS := $(wildcard source/*.S) ASM_OBJS := $(addprefix build/source/,$(notdir $(ASM_SRCS:.S=.o))) ASM_DEPS := $(addprefix build/source/,$(notdir $(ASM_SRCS:.S=.d))) @@ -55,34 +58,34 @@ DEFAULT_MAIN_CPP_SRCS := ./core/default_main.cpp DEFAULT_MAIN_OBJS := ./build/core/default_main.o DEFAULT_MAIN_CPP_DEPS := ./build/core/default_main.d - + # All = build BeagleRT all: BeagleRT - + # Rule for BeagleRT core C++ files build/core/%.o: ./core/%.cpp @echo 'Building file: $<' @echo 'Invoking: GCC C++ Compiler' - g++ -I/usr/xenomai/include -I/usr/arm-linux-gnueabihf/include/xenomai/include -I/usr/arm-linux-gnueabihf/include/ne10 -O2 -Wall -c -fmessage-length=0 -U_FORTIFY_SOURCE -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@:%.o=%.d)" -o "$@" "$<" + g++ $(INCLUDES) -O2 -Wall -c -fmessage-length=0 -U_FORTIFY_SOURCE -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@:%.o=%.d)" -o "$@" "$<" @echo 'Finished building: $<' @echo ' ' - + # Rule for user-supplied C++ files build/source/%.o: ./source/%.cpp @echo 'Building file: $<' @echo 'Invoking: GCC C++ Compiler' - g++ -I./include -I/usr/xenomai/include -I/usr/arm-linux-gnueabihf/include/xenomai/include -I/usr/arm-linux-gnueabihf/include/ne10 -O2 -Wall -c -fmessage-length=0 -U_FORTIFY_SOURCE -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@:%.o=%.d)" -o "$@" "$<" + g++ -I./include $(INCLUDES) -O2 -Wall -c -fmessage-length=0 -U_FORTIFY_SOURCE -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@:%.o=%.d)" -o "$@" "$<" @echo 'Finished building: $<' @echo ' ' - + # Rule for user-supplied C files build/source/%.o: ./source/%.c @echo 'Building file: $<' @echo 'Invoking: GCC C Compiler' - gcc -I./include -I/usr/xenomai/include -I/usr/arm-linux-gnueabihf/include/xenomai/include -I/usr/arm-linux-gnueabihf/include/ne10 -O2 -Wall -c -fmessage-length=0 -U_FORTIFY_SOURCE -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@:%.o=%.d)" -o "$@" "$<" + gcc -I./include $(INCLUDES) -O2 -Wall -c -fmessage-length=0 -U_FORTIFY_SOURCE -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@:%.o=%.d)" -o "$@" "$<" @echo 'Finished building: $<' @echo ' ' - + # Rule for user-supplied assembly files build/source/%.o: ./source/%.S @echo 'Building file: $<' @@ -102,7 +105,7 @@ @echo 'Finished building target: $@' @echo ' ' # $(MAKE) --no-print-directory post-build - + # Rule for building BeagleRT including the default main file (no user-supplied main()) BeagleRT_with_main: $(CORE_OBJS) $(DEFAULT_MAIN_OBJS) $(ASM_OBJS) $(C_OBJS) $(CPP_OBJS) $(STATIC_LIBS) @echo 'Building target: $@'