Mercurial > hg > beaglert
comparison Makefile @ 478:cb875406a594 prerelease
Makefile does syntax check of the project files only (ignores core)
author | Giulio Moro <giuliomoro@yahoo.it> |
---|---|
date | Mon, 20 Jun 2016 21:38:57 +0100 |
parents | 5a936f8e9447 |
children | 617da76ae4d9 |
comparison
equal
deleted
inserted
replaced
477:5934790c7c15 | 478:cb875406a594 |
---|---|
158 debug: all | 158 debug: all |
159 | 159 |
160 # syntax = check syntax | 160 # syntax = check syntax |
161 syntax: ## Only checks syntax | 161 syntax: ## Only checks syntax |
162 syntax: SYNTAX_FLAG := -fsyntax-only | 162 syntax: SYNTAX_FLAG := -fsyntax-only |
163 syntax: Bela | 163 syntax: $(PROJECT_OBJS) |
164 | 164 |
165 # Rule for Bela core C++ files | 165 # Rule for Bela core C++ files |
166 build/core/%.o: ./core/%.cpp | 166 build/core/%.o: ./core/%.cpp |
167 @echo 'Building $(notdir $<)...' | 167 @echo 'Building $(notdir $<)...' |
168 # @echo 'Invoking: C++ Compiler $(CXX)' | 168 # @echo 'Invoking: C++ Compiler $(CXX)' |
212 $(shell bash -c '[ `nm $(PROJECT_OBJS) 2>/dev/null | grep -w T | grep -w main | wc -l` == '0' ] && echo "$(DEFAULT_MAIN_OBJS)" || : ')) | 212 $(shell bash -c '[ `nm $(PROJECT_OBJS) 2>/dev/null | grep -w T | grep -w main | wc -l` == '0' ] && echo "$(DEFAULT_MAIN_OBJS)" || : ')) |
213 @#If there is a .pd file AND there is no "render" symbol then link in the $(DEFAULT_PD_OBJS) | 213 @#If there is a .pd file AND there is no "render" symbol then link in the $(DEFAULT_PD_OBJS) |
214 $(eval DEFAULT_PD_CONDITIONAL :=\ | 214 $(eval DEFAULT_PD_CONDITIONAL :=\ |
215 $(shell bash -c '{ ls $(PROJECT_DIR)/*.pd &>/dev/null && [ `nm $(PROJECT_OBJS) 2>/dev/null | grep -w T | grep "render.*BelaContext" | wc -l` -eq 0 ]; } && echo '$(DEFAULT_PD_OBJS)' || : ' )) | 215 $(shell bash -c '{ ls $(PROJECT_DIR)/*.pd &>/dev/null && [ `nm $(PROJECT_OBJS) 2>/dev/null | grep -w T | grep "render.*BelaContext" | wc -l` -eq 0 ]; } && echo '$(DEFAULT_PD_OBJS)' || : ' )) |
216 @echo 'Linking...' | 216 @echo 'Linking...' |
217 $(CXX) $(SYNTAX_FLAG) -L/usr/xenomai/lib -L/usr/arm-linux-gnueabihf/lib -L/usr/arm-linux-gnueabihf/lib/xenomai -L/usr/lib/arm-linux-gnueabihf -pthread -Wpointer-arith -o "$(PROJECT_DIR)/$(PROJECT)" $(CORE_ASM_OBJS) $(CORE_OBJS) $(DEFAULT_MAIN_CONDITIONAL) $(DEFAULT_PD_CONDITIONAL) $(ASM_OBJS) $(C_OBJS) $(CPP_OBJS) $(STATIC_LIBS) $(LIBS) | 217 @$(CXX) $(SYNTAX_FLAG) -L/usr/xenomai/lib -L/usr/arm-linux-gnueabihf/lib -L/usr/arm-linux-gnueabihf/lib/xenomai -L/usr/lib/arm-linux-gnueabihf -pthread -Wpointer-arith -o "$(PROJECT_DIR)/$(PROJECT)" $(CORE_ASM_OBJS) $(CORE_OBJS) $(DEFAULT_MAIN_CONDITIONAL) $(DEFAULT_PD_CONDITIONAL) $(ASM_OBJS) $(C_OBJS) $(CPP_OBJS) $(STATIC_LIBS) $(LIBS) |
218 @echo ' ...done' | 218 @echo ' ...done' |
219 | 219 |
220 # Other Targets: | 220 # Other Targets: |
221 projectclean:## Remove the PROJECT's build objects & binary | 221 projectclean:## Remove the PROJECT's build objects & binary |
222 -$(RM) $(PROJECT_DIR)/build/* $(OUTPUT_FILE) | 222 -$(RM) $(PROJECT_DIR)/build/* $(OUTPUT_FILE) |