rockbox/tools/make.inc
Daniel Stenberg 22034ce5c2 repair the broken dependency stuff
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@5170 a1c6a512-1295-4272-9138-f99709370657
2004-10-05 07:50:33 +00:00

24 lines
640 B
PHP

$(OBJDIR)/%.o: %.c
@mkdir -p `dirname $@`
@echo "CC $<"
@$(CC) $(CFLAGS) -c $< -o $@
$(OBJDIR)/%.o: %.S
@mkdir -p `dirname $@`
@echo "CC $<"
@$(CC) $(CFLAGS) -c $< -o $@
# the lame echo stuff down here is to prevent any compiler errors/warnings
# to cause an error code to get returned and thus stop the build
$(DEPFILE): $(SOURCES)
@rm -f $(DEPFILE)
@(for each in $(SOURCES); do \
obj=`echo $$each | sed -e 's/\.[cS]/.o/'`; \
$(CC) -MM -MT "$(OBJDIR)/$$obj" $(CFLAGS) $$each >> $(DEPFILE) 2>/dev/null; \
done; \
echo "oo" >/dev/null )
tags:
@(for d in $(DIRS); do \
etags -o $(OBJDIR)/TAGS -a $$d/*.[ch]; \
done)