# HG changeset patch # User Giulio Moro # Date 1466435340 -3600 # Node ID 1d585c5fa663e532250778796f3f8cb3bf81b3ab # Parent c47709e8b5c90783740b3b28e22d1d1765c270e6 Makefile with automatic libpd now works for real diff -r c47709e8b5c9 -r 1d585c5fa663 Makefile --- a/Makefile Mon Jun 20 15:10:12 2016 +0100 +++ b/Makefile Mon Jun 20 16:09:00 2016 +0100 @@ -212,8 +212,7 @@ $(shell bash -c '[ `nm $(PROJECT_OBJS) 2>/dev/null | grep -w T | grep -w main | wc -l` == '0' ] && echo "$(DEFAULT_MAIN_OBJS)" || : ')) @#If there is a _main.pd file AND there is no "render" symbol then link in the $(DEFAULT_PD_OBJS) $(eval DEFAULT_PD_CONDITIONAL :=\ - $(shell bash -c '{ [ -f "$(PROJECT_DIR)/_main.pd" ] && [ `nm $(PROJECT_OBJS) 2>/dev/null | grep -w T | grep -w render | wc -l` = '0' ]; } && echo '$(DEFAULT_PD_OBJS)' || : ' )) - @echo $(DEFAULT_MAIN_CONDITIONAL) $(DEFAULT_PD_CONDITIONAL) + $(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)' || : ' )) @echo 'Linking...' $(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) @echo ' ...done'