]> git.gir.st - tmk_keyboard.git/blob - protocol/lufa/LUFA-git/LUFA/makefile
Squashed 'tmk_core/' changes from caca2c0..dc0e46e
[tmk_keyboard.git] / protocol / lufa / LUFA-git / LUFA / makefile
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
12 LUFA_VERSION_NUM = $(shell grep LUFA_VERSION_STRING $(LUFA_PATH)/Version.h | cut -d'"' -f2)
13 EXCLUDE_FROM_EXPORT := Documentation DoxygenPages CodeTemplates Build StudioIntegration doxyfile *.tar *.o *.d *.lss *.lst *.hex *.elf *.hex *.eep *.map *.bin
14
15 # Default target - no default action when attempting to build the core directly
16 all:
17
18 # Export the library core as a TAR archive for importing into an IDE
19 export_tar:
20 @echo Exporting LUFA library to a TAR archive...
21 @tar -cf LUFA_$(LUFA_VERSION_NUM).tar --directory=. $(EXCLUDE_FROM_EXPORT:%=--exclude=%) *
22 @tar -cf LUFA_$(LUFA_VERSION_NUM)_Code_Templates.tar CodeTemplates
23 @echo Export LUFA_$(LUFA_VERSION_NUM).tar complete.
24
25 # Display the LUFA version of this library copy
26 version:
27 @echo "LUFA $(LUFA_VERSION_NUM)"
28
29 # Check if this is being included from a legacy or non LUFA build system makefile
30 ifneq ($(LUFA_PATH),)
31 LUFA_ROOT_PATH = $(patsubst %/,%,$(LUFA_PATH))/LUFA/
32
33 include $(patsubst %/,%,$(LUFA_PATH))/LUFA/Build/lufa_sources.mk
34 else
35 LUFA_BUILD_MODULES += MASTER
36 LUFA_BUILD_TARGETS += export_tar version
37
38 LUFA_PATH = .
39 ARCH = {AVR8,UC3,XMEGA}
40 DOXYGEN_OVERRIDE_PARAMS = QUIET=YES PROJECT_NUMBER=$(LUFA_VERSION_NUM)
41
42 # Remove all object and associated files from the LUFA library core
43 clean:
44 rm -f $(LUFA_SRC_ALL_FILES:%.c=%.o)
45 rm -f $(LUFA_SRC_ALL_FILES:%.c=%.d)
46 rm -f $(LUFA_SRC_ALL_FILES:%.c=%.lst)
47
48 include Build/lufa_core.mk
49 include Build/lufa_sources.mk
50 include Build/lufa_doxygen.mk
51 endif
52
53 .PHONY: all export_tar version clean
Imprint / Impressum