Makefile 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  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. $(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. FORCE:
  33. .PHONY: FORCE clean distclean