Fix Makefile dependency inclusion for other software.
authorTim 'mithro' Ansell <mithro@mithis.com>
Mon, 19 Dec 2016 13:29:13 +0000 (14:29 +0100)
committerTim 'mithro' Ansell <mithro@mithis.com>
Mon, 19 Dec 2016 13:29:33 +0000 (14:29 +0100)
litex/soc/software/libbase/Makefile
litex/soc/software/libcompiler_rt/Makefile
litex/soc/software/libnet/Makefile

index be6d6a7a889b29ea4451eff5d1bba4bf84d559c7..dee4a5c4d43db2bbb3e9ce19dffecc3f78329298 100644 (file)
@@ -11,6 +11,9 @@ libbase.a: $(OBJECTS) vsnprintf.o
 libbase-nofloat.a: $(OBJECTS) vsnprintf-nofloat.o
        $(AR) crs libbase-nofloat.a $(OBJECTS) vsnprintf-nofloat.o
 
+# pull in dependency info for *existing* .o files
+-include $(OBJECTS:.o=.d)
+
 vsnprintf-nofloat.o: $(LIBBASE_DIRECTORY)/vsnprintf.c
        $(call compile,-DNO_FLOAT)
 
index 5db5c007ebb1ab046051d1e3140ccdfc40e0c902..58d83e3008890572d176e715baa7b25c32cc731b 100644 (file)
@@ -17,6 +17,9 @@ libcompiler_rt.a: $(OBJECTS)
        $(CC) -c $(CFLAGS) $(1) $(SOC_DIRECTORY)/software/libcompiler_rt/mulsi3.c -o mulsi3.o
        $(AR) crs libcompiler_rt.a $(OBJECTS)
 
+# pull in dependency info for *existing* .o files
+-include $(OBJECTS:.o=.d)
+
 mulsi3.o: $(SOC_DIRECTORY)/software/libcompiler_rt/mulsi3.c
        $(compile)
 
index 48a70bc7d9c37105e47cf2efc7643557c44f36b9..188e48d64150a0c80b323287c78e69d324e07f8c 100644 (file)
@@ -8,6 +8,9 @@ all: libnet.a
 libnet.a: $(OBJECTS)
        $(AR) crs libnet.a $(OBJECTS)
 
+# pull in dependency info for *existing* .o files
+-include $(OBJECTS:.o=.d)
+
 %.o: $(LIBNET_DIRECTORY)/%.c
        $(compile)