Click here to Skip to main content
15,889,896 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,

I have a makefile which for some reason does not execute the last rule. Here is the file

C++
SRCS=$(wildcard *.endian)
SRCSE=$(wildcard *.json)
OBJS=$(SRCS:.endian=.o)
ENDIAN=$(SRCSE:.json=.endian)
OBJDIR=$(OS_TARGET)/$(BUILD_TYPE)

all: start os_target $(ENDIAN) $(OBJS)
.PHONY: all

start:
ifeq ($(OS_TARGET),)
	@echo "No OS target supplied... aborting."
	@exit 1
endif
	@echo "*** Target: $(OS_TARGET) [$(BUILD_TYPE)] ***"


os_target:
ifeq (,$(findstring $(OBJDIR),$(wildcard $(OBJDIR) )))
	@mkdir -p $(OBJDIR)
endif

%.endian:%.json
	@echo "Convert into Big-Endian:"
	endian_convert.bin $<

%.o:%.endian
	@echo "Build object:"
	$(OCC) $(OFLAGS) $< $(OS_TARGET)/$(BUILD_TYPE)/$@

clean:
ifeq ($(OS_TARGET),)
	@echo "No OS target supplied... aborting."
	@exit 1
endif
	@${RM} -frv $(CURDIR)/$(OS_TARGET)/$(BUILD_TYPE)/*.o
	@${RM} -frv $(CURDIR)/*.endian


For some reason the rule $(OBJS) is not executing.

Does anyone have an idea why this is happening?

Thanks in advance
Posted
Comments
GiZmoDragonBack 25-Oct-13 9:18am    
The .endian files are generated in $(ENDIAN) rule. I noticed that if the SRCS=$(wildcard *.endian) are not there the wildcard does not find the file.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900