Makefile add text to variable in rule
Hi!
I have a problem with a makefile. This is a very special kind of makefile and I just want to make a temporary solution. When the Makefile shall link the program I want to include an additional file to a global variable called OBJS. The lines look as follows: bin_link: $(OBJS) $(WHATEVERLIB1) $(WHATEVERLIB2) @echo "Linking" @$(LD) $(LDFLIB) $(OBJS) $(LIBS) -o $(PROGRAM) @echo "done" So I would like to add a filename to OBJS before linking, such as test.o like this for example: OBJS=$(OBJS) test.o But I dont get it to work, how should I do this? Really thankfull for answers! |
Code:
bin_link: OBJS += test.o |
All times are GMT -5. The time now is 04:03 AM. |