Mercurial > hg > beaglert
changeset 186:524c87ec23a3
Makefile now compiles core/*.cpp except core/default_main.cpp (unless needed). Closes #1530
author | Giulio Moro <giuliomoro@yahoo.it> |
---|---|
date | Tue, 19 Jan 2016 01:54:34 +0000 |
parents | 31e898185ae8 |
children | d7148d21aaa5 |
files | Makefile |
diffstat | 1 files changed, 6 insertions(+), 32 deletions(-) [+] |
line wrap: on
line diff
--- a/Makefile Mon Jan 18 20:18:01 2016 +0000 +++ b/Makefile Tue Jan 19 01:54:34 2016 +0000 @@ -10,7 +10,7 @@ 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 +INCLUDES := -I./include -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) @@ -26,35 +26,9 @@ CPP_DEPS := $(addprefix build/source/,$(notdir $(CPP_SRCS:.cpp=.d))) # Core BeagleRT sources -CORE_CPP_SRCS := \ -./core/GPIOcontrol.cpp \ -./core/I2c_Codec.cpp \ -./core/PRU.cpp \ -./core/RTAudio.cpp \ -./core/RTAudioCommandLine.cpp \ -./core/Utilities.cpp \ -./core/UdpClient.cpp \ -./core/WriteFile.cpp - -CORE_OBJS := \ -./build/core/GPIOcontrol.o \ -./build/core/I2c_Codec.o \ -./build/core/PRU.o \ -./build/core/RTAudio.o \ -./build/core/RTAudioCommandLine.o \ -./build/core/Utilities.o \ -./build/core/UdpClient.o \ -./build/core/WriteFile.o - -CORE_CPP_DEPS := \ -./build/core/GPIOcontrol.d \ -./build/core/I2c_Codec.d \ -./build/core/PRU.d \ -./build/core/RTAudio.d \ -./build/core/RTAudioCommandLine.d \ -./build/core/Utilities.d \ -./build/core/UdpClient.d \ -./build/core/WriteFile.d +CORE_CPP_SRCS = $(filter-out core/default_main.cpp, $(wildcard core/*.cpp)) +CORE_OBJS := $(addprefix build/core/,$(notdir $(CORE_CPP_SRCS:.cpp=.o))) +CORE_CPP_DEPS := $(addprefix build/core/,$(notdir $(CORE_CPP_SRCS:.cpp=.d))) # Objects for a system-supplied default main() file, if the user # only wants to provide the render functions. @@ -82,7 +56,7 @@ build/source/%.o: ./source/%.cpp @echo 'Building file: $<' @echo 'Invoking: GCC C++ Compiler' - g++ $(SYNTAX_FLAG) -I./include $(INCLUDES) -O2 -Wall -c -fmessage-length=0 -U_FORTIFY_SOURCE -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@:%.o=%.d)" -o "$@" "$<" + g++ $(SYNTAX_FLAG) $(INCLUDES) -O2 -Wall -c -fmessage-length=0 -U_FORTIFY_SOURCE -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@:%.o=%.d)" -o "$@" "$<" @echo 'Finished building: $<' @echo ' ' @@ -90,7 +64,7 @@ build/source/%.o: ./source/%.c @echo 'Building file: $<' @echo 'Invoking: GCC C Compiler' - gcc $(SYNTAX_FLAG) -I./include $(INCLUDES) -O2 -Wall -c -fmessage-length=0 -U_FORTIFY_SOURCE -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@:%.o=%.d)" -o "$@" "$<" -std=c99 + gcc $(SYNTAX_FLAG) $(INCLUDES) -O2 -Wall -c -fmessage-length=0 -U_FORTIFY_SOURCE -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@:%.o=%.d)" -o "$@" "$<" -std=c99 @echo 'Finished building: $<' @echo ' '