Makefile question?
I have a Makefile with:
.PHONY: all clean distcleanwhere: LEXFILE := lex.yy.cIf I redefine: all: $(LEXFILE) $(OBJDIR)/%.owhere: OBJDIR = objI get: make: *** No rule to make target `obj/%.o', needed by `all'. Stop. Why? |
the line all: $(LEXFILE) $(OBJDIR)/%.o is syntactically correct, but will not do what you want, you would need to check the documentation about how to use %.
In your case make is looking for a file named %.o in the dir obj. Usually you need something like that: %.ext1: %.ext2 where % can be replaced with a filename using ext1 and ext2 as target(result) and source. |
Well, what did you mean by $(OBJDIR)/%.o? What should make have substitute with?
|
All times are GMT -5. The time now is 02:41 PM. |