upload
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
This repo is archived. You can view files and clone it, but cannot push or open issues/pull-requests.

makefile 1.8KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. #
  2. # LUFA Library
  3. # Copyright (C) Dean Camera, 2014.
  4. #
  5. # dean [at] fourwalledcubicle [dot] com
  6. # www.lufa-lib.org
  7. #
  8. # ---------------------------------------
  9. # Makefile for the LUFA library itself.
  10. # ---------------------------------------
  11. LUFA_VERSION_NUM = $(shell grep LUFA_VERSION_STRING $(LUFA_PATH)/Version.h | cut -d'"' -f2)
  12. EXCLUDE_FROM_EXPORT := Documentation DoxygenPages CodeTemplates Build StudioIntegration doxyfile *.tar *.o *.d *.lss *.lst *.hex *.elf *.hex *.eep *.map *.bin
  13. # Default target - no default action when attempting to build the core directly
  14. all:
  15. # Export the library core as a TAR archive for importing into an IDE
  16. export_tar:
  17. @echo Exporting LUFA library to a TAR archive...
  18. @tar -cf LUFA_$(LUFA_VERSION_NUM).tar --directory=. $(EXCLUDE_FROM_EXPORT:%=--exclude=%) *
  19. @tar -cf LUFA_$(LUFA_VERSION_NUM)_Code_Templates.tar CodeTemplates
  20. @echo Export LUFA_$(LUFA_VERSION_NUM).tar complete.
  21. # Display the LUFA version of this library copy
  22. version:
  23. @echo "LUFA $(LUFA_VERSION_NUM)"
  24. # Check if this is being included from a legacy or non LUFA build system makefile
  25. ifneq ($(LUFA_PATH),)
  26. LUFA_ROOT_PATH = $(patsubst %/,%,$(LUFA_PATH))/LUFA/
  27. include $(patsubst %/,%,$(LUFA_PATH))/LUFA/Build/lufa_sources.mk
  28. else
  29. LUFA_BUILD_MODULES += MASTER
  30. LUFA_BUILD_TARGETS += export_tar version
  31. LUFA_PATH = .
  32. ARCH = {AVR8,UC3,XMEGA}
  33. DOXYGEN_OVERRIDE_PARAMS = QUIET=YES PROJECT_NUMBER=$(LUFA_VERSION_NUM)
  34. # Remove all object and associated files from the LUFA library core
  35. clean:
  36. rm -f $(LUFA_SRC_ALL_FILES:%.c=%.o)
  37. rm -f $(LUFA_SRC_ALL_FILES:%.c=%.d)
  38. rm -f $(LUFA_SRC_ALL_FILES:%.c=%.lst)
  39. include Build/lufa_core.mk
  40. include Build/lufa_sources.mk
  41. include Build/lufa_doxygen.mk
  42. endif
  43. .PHONY: all export_tar version clean