Makefile 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. # ===========================================================================
  2. # OpenWrt configuration targets
  3. # These targets are used from top-level makefile
  4. # ===========================================================================
  5. # Shared Makefile for the various kconfig executables:
  6. # conf: Used for defconfig, oldconfig and related targets
  7. # mconf: Used for the mconfig target.
  8. # Utilizes the lxdialog package
  9. # object files used by all kconfig flavours
  10. # Platform specific fixes
  11. #
  12. # FreeBSD
  13. export CFLAGS+=-DKBUILD_NO_NLS
  14. conf-objs := conf.o zconf.tab.o
  15. mconf-objs := mconf.o zconf.tab.o
  16. clean-files := lkc_defs.h qconf.moc .tmp_qtcheck \
  17. .tmp_gtkcheck zconf.tab.c lex.zconf.c zconf.hash.c
  18. all: conf mconf lxdialog/lxdialog
  19. lxdialog/lxdialog:
  20. $(MAKE) -C lxdialog
  21. conf: $(conf-objs)
  22. mconf: $(mconf-objs)
  23. clean:
  24. rm -f *.o $(clean-files) conf mconf
  25. $(MAKE) -C lxdialog clean
  26. zconf.tab.o: lex.zconf.c zconf.hash.c confdata.c
  27. kconfig_load.o: lkc_defs.h
  28. lkc_defs.h: $(src)/lkc_proto.h
  29. sed < $< > $@ 's/P(\([^,]*\),.*/#define \1 (\*\1_p)/'
  30. zconf.tab.c: zconf.y
  31. lex.zconf.c: zconf.l
  32. zconf.hash.c: zconf.gperf
  33. %.tab.c: %.y
  34. cp $@_shipped $@ || bison -l -b $* -p $(notdir $*) $<
  35. lex.%.c: %.l
  36. cp $@_shipped $@ || flex -L -P$(notdir $*) -o$@ $<
  37. %.hash.c: %.gperf
  38. cp $@_shipped $@ || gperf < $< > $@