Makefile 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. obj := .
  2. src := .
  3. top_srcdir=../../
  4. top_builddir=../../
  5. srctree := .
  6. include $(top_builddir)Rules.mak
  7. include Makefile.kconfig
  8. ifeq ($(findstring mconf,$(MAKECMDGOALS)),mconf)
  9. hostprogs-y += mconf
  10. endif
  11. -include .depend
  12. .depend: $(wildcard *.h *.c)
  13. $(Q)$(HOSTCC) $(HOST_EXTRACFLAGS) $(HOSTCFLAGS) -MM *.c > .depend 2>/dev/null || :
  14. __hostprogs := $(sort $(hostprogs-y) $(hostprogs-m))
  15. host-csingle := $(foreach m,$(__hostprogs),$(if $($(m)-objs),,$(m)))
  16. host-cmulti := $(foreach m,$(__hostprogs),\
  17. $(if $($(m)-cxxobjs),,$(if $($(m)-objs),$(m))))
  18. host-cobjs := $(sort $(foreach m,$(__hostprogs),$($(m)-objs)))
  19. $(host-csingle): %: %.c
  20. $(HOSTCC) $(HOST_EXTRACFLAGS) $(HOSTCFLAGS) $(HOSTCFLAGS_$@) $< $(HOST_LOADLIBES) -o $@
  21. $(host-cmulti): %: $(host-cobjs) $(host-cshlib)
  22. $(HOSTCC) $(HOST_EXTRACFLAGS) $(HOSTCFLAGS) $(HOSTCFLAGS_$@) $($@-objs) $(HOST_LOADLIBES) -o $@
  23. $(host-cobjs): %.o: %.c
  24. $(HOSTCC) $(HOST_EXTRACFLAGS) $(HOSTCFLAGS) $(HOSTCFLAGS_$@) -c $< -o $@
  25. $(obj)/%:: $(src)/%_shipped
  26. $(Q)cat $< > $@
  27. clean:
  28. $(Q)rm -f $(clean-files) conf
  29. distclean: clean
  30. $(Q)rm -f $(lxdialog) $(conf-objs) $(mconf-objs) $(kxgettext-objs) \
  31. $(hostprogs-y) $(qconf-cxxobjs) $(qconf-objs) $(gconf-objs) \
  32. .depend
  33. $(Q)rm -r -f $(top_builddir)include/config
  34. FORCE:
  35. .PHONY: FORCE clean distclean