summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--rbutil/libtools.make4
-rw-r--r--rbutil/mkimxboot/Makefile4
-rw-r--r--rbutil/mktccboot/Makefile5
3 files changed, 3 insertions, 10 deletions
diff --git a/rbutil/libtools.make b/rbutil/libtools.make
index 59be99f..2e3cc6f 100644
--- a/rbutil/libtools.make
+++ b/rbutil/libtools.make
@@ -80,6 +80,8 @@ all: $(BINARY)
OBJS := $(patsubst %.c,%.o,$(addprefix $(OBJDIR),$(notdir $(SOURCES))))
LIBOBJS := $(patsubst %.c,%.o,$(addprefix $(OBJDIR),$(notdir $(LIBSOURCES))))
+$(foreach src,$(SOURCES) $(LIBSOURCES),$(eval $(addprefix $(OBJDIR),$(subst .c,.o,$(notdir $(src)))): $(src)))
+
# additional link dependencies for the standalone executable
# extra dependencies: libucl
LIBUCL = libucl$(RBARCH).a
@@ -98,7 +100,7 @@ $(BINARY): $(OBJS) $(EXTRADEPS) $(addprefix $(OBJDIR),$(EXTRALIBOBJS))
$(addprefix $(OBJDIR),$(EXTRALIBOBJS))
# common rules
-$(OBJDIR)%.o: %.c
+$(OBJDIR)%.o:
@echo CC $<
$(SILENT)mkdir -p $(dir $@)
$(SILENT)$(CROSS)$(CC) $(CFLAGS) -c -o $@ $<
diff --git a/rbutil/mkimxboot/Makefile b/rbutil/mkimxboot/Makefile
index a81b960..acfe8de 100644
--- a/rbutil/mkimxboot/Makefile
+++ b/rbutil/mkimxboot/Makefile
@@ -27,7 +27,3 @@ include ../libtools.make
$(OBJDIR)mkimxboot.o: dualboot.h dualboot.c mkimxboot.c mkimxboot.h
$(OBJDIR)main.o: dualboot.h dualboot.c main.c mkimxboot.h
-$(OBJDIR)%.o: $(IMXTOOLS_DIR)%.c
- @echo CC $<
- $(SILENT)mkdir -p $(dir $@)
- $(SILENT)$(CROSS)$(CC) $(CFLAGS) -c -o $@ $<
diff --git a/rbutil/mktccboot/Makefile b/rbutil/mktccboot/Makefile
index 31ad68e..df49c69 100644
--- a/rbutil/mktccboot/Makefile
+++ b/rbutil/mktccboot/Makefile
@@ -25,9 +25,4 @@ include ../libtools.make
# Rules go _after_ including mkboot.make to have OBJDIR set up correctly.
# Paths are assumed to end with a /
telechips.o: $(OBJDIR)telechips.o
-$(OBJDIR)%.o: $(TOOLSDIR)%.c
- @echo CC $<
- $(SILENT)mkdir -p $(dir $@)
- $(SILENT)$(CROSS)$(CC) $(CFLAGS) -c -o $@ $<
-