+
+%.o: %.c
+$(OBJDIR)/%.o : %.c $(OBJDIR)/%.d
+ $(CC) $(DEPFLAGS) $(CFLAGS) $(ZLIBFLAGS) -c -o $@ $<
+ $(POSTCOMPILE)
+
+%.o: %.cpp
+$(OBJDIR)/%.o : %.cpp $(OBJDIR)/%.d
+ $(CXX) $(DEPFLAGS) $(CXXFLAGS) -c -o $@ $<
+ $(POSTCOMPILE)
+
+
+#$(CMDOBJS) $(COREOBJS): $(notdir $(%.c)) %.d
+# $(CC) $(DEPFLAGS) $(CFLAGS) -c -o $@ $<
+# $(POSTCOMPILE)
+
+#$(ZLIBOBJS): $(notdir $(%.c)) %.d
+# $(CC) $(DEPFLAGS) $(CFLAGS) $(ZLIBFLAGS) -c -o $@ $<
+# $(POSTCOMPILE)
+
+#$(QTGUIOBJS): $(notdir $(%.cpp)) %.d
+# $(CXX) $(DEPFLAGS) $(CXXFLAGS) -c -o $@ $<
+# $(POSTCOMPILE)
+
+DEPENDENCY_FILES = $(patsubst %.c, $(OBJDIR)/%.d, $(CORESRCS) $(CMDSRCS) $(ZLIBSRCS)) \
+ $(patsubst %.cpp, $(OBJDIR)/%.d, $(QTGUISRCS)) \
+ $(OBJDIR)/proxmark3.d $(OBJDIR)/flash.d $(OBJDIR)/flasher.d $(OBJDIR)/fpga_compress.d
+
+$(DEPENDENCY_FILES): ;
+.PRECIOUS: $(DEPENDENCY_FILES)
+
+-include $(DEPENDENCY_FILES)
+