Add a list of module provided make variables and macros to the build system modules.
[pub/USBasp.git] / LUFA / makefile
1 #
2 # LUFA Library
3 # Copyright (C) Dean Camera, 2012.
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 Version.h | cut -d'"' -f2)
13 EXCLUDE_FROM_EXPORT := Documentation DoxygenPages CodeTemplates Build *.conf *.tar *.o *.lss *.lst *.hex *.elf *.hex *.eep *.map *.bin *.d
14
15 DOXYGEN_OVERRIDE_PARAMS = PROJECT_NUMBER=$(LUFA_VERSION_NUM)
16
17 all:
18
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 version:
26 @echo "LUFA $(LUFA_VERSION_NUM)"
27
28 # Check if this is being included from a legacy or non LUFA build system makefile
29 ifneq ($(LUFA_PATH),)
30 LUFA_ROOT_PATH = $(LUFA_PATH)/LUFA/
31 include $(LUFA_PATH)/LUFA/Build/lufa.sources.in
32 else
33 LUFA_BUILD_MODULES += LIBCORE
34 LUFA_BUILD_TARGETS += export_tar version
35
36 LUFA_PATH = .
37 ARCH = {AVR8,UC3,XMEGA}
38
39 clean:
40 rm -f $(LUFA_SRC_ALL_FILES:%.c=%.o)
41 rm -f $(LUFA_SRC_ALL_FILES:%.c=%.o.d)
42 rm -f $(LUFA_SRC_ALL_FILES:%.c=%.lst)
43
44 # Include LUFA build script makefiles
45 include Build/lufa.core.in
46 include Build/lufa.sources.in
47 include Build/lufa.doxygen.in
48 endif