comparison Makefile @ 470:5a936f8e9447 prerelease

I mean it actually works for real. Libpd checks for file and exits with meaningful error message if it does not find it.
author Giulio Moro <giuliomoro@yahoo.it>
date Mon, 20 Jun 2016 18:04:11 +0100
parents 03a2cd5f151b
children cb875406a594
comparison
equal deleted inserted replaced
468:85cf9c0da052 470:5a936f8e9447
208 # we want to link in the default main file or not. The kludge is the mess of a shell script 208 # we want to link in the default main file or not. The kludge is the mess of a shell script
209 # line below. Surely there's a better way to do this? 209 # line below. Surely there's a better way to do this?
210 $(OUTPUT_FILE): $(CORE_ASM_OBJS) $(CORE_OBJS) $(PROJECT_OBJS) $(STATIC_LIBS) $(DEFAULT_MAIN_OBJS) $(DEFAULT_PD_OBJS) 210 $(OUTPUT_FILE): $(CORE_ASM_OBJS) $(CORE_OBJS) $(PROJECT_OBJS) $(STATIC_LIBS) $(DEFAULT_MAIN_OBJS) $(DEFAULT_PD_OBJS)
211 $(eval DEFAULT_MAIN_CONDITIONAL :=\ 211 $(eval DEFAULT_MAIN_CONDITIONAL :=\
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 _main.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 '{ [ -f "$(PROJECT_DIR)/_main.pd" ] && [ `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: