debug touches $(LIB) and so the modtime for $(LIB) is newer than $(OBJS), so they're not linked in to the library. This causes an undefined symbol link error when we try to build bin/fluidity.
I see two ways of fixing this:
revert to the previous (.PHONY) rule:
default: $(OBJS)
...
So that the object files are always stuffed in $(LIB)
I'm not quite happy with this entire series as is. Specifically, it breaks the sequence:
make
make clean-light
make
Since libwm is not cleaned by clean-light, the object files are left lying around. The default rule in libwm/Makefile with this patch series is:
default: $(LIB)
$(LIB): $(OBJS)
$(AR) $(ARFLAGS) $(LIB) $(OBJS)
cp *.h ../include/
But the make sequence is:
make debug
make libwm
debug touches $(LIB) and so the modtime for $(LIB) is newer than $(OBJS), so they're not linked in to the library. This causes an undefined symbol link error when we try to build bin/fluidity.
I see two ways of fixing this:
revert to the previous (.PHONY) rule:
default: $(OBJS)
...
So that the object files are always stuffed in $(LIB)
Or add libwm to the list of clean-light targets.
I prefer the latter, thoughts?