NavigationUser loginSpam?See spam posts on this site? If so, please don't reply to the spam! Instead, just report the URL to the webmaster. |
Help with makefile using subdir for object filesI'm trying to rewrite some Makefiles to allow for intermediate files to be stored in an object subdirectory (./obj) and final executables to be stored in ./bin. However, make doesn't seem to like what I've done. Any ideas on how I could fix this? Here is one of the simpler Makefiles after I've made modifications: CC = gcc OBJDIR = obj kpadsources = $(shell ls -t kanjipad/*.c) # Compile most recently edicted files first. $(kpengine) : $(kpadobjects) $(OBJDIR)/kanjipad/%.o: kanjipad/%.c And here's the output: mkdir -p bin/kanjipad |
Help with makefile using
I think it might be a simple fix:
kpadobjects = $(sources:%.c=$(OBJDIR)/%.o)
should read
kpadobjects = $(kpadsources:%.c=$(OBJDIR)/%.o)
Help with makefile using
Yeah, that was wrong... there was a number of other things too; I rearranged my subdirs a bit and missed some of the old references. Fixed those, and it works now. Thanks for pointing out my PEBKAC there. :P