2010-05-08 03:12:14 +00:00
|
|
|
#
|
|
|
|
|
# LUFA Library
|
2013-01-03 11:37:33 +00:00
|
|
|
# Copyright (C) Dean Camera, 2013.
|
2010-10-13 14:05:35 +00:00
|
|
|
#
|
2010-05-08 03:12:14 +00:00
|
|
|
# dean [at] fourwalledcubicle [dot] com
|
2010-10-28 06:08:58 +00:00
|
|
|
# www.lufa-lib.org
|
2010-05-08 03:12:14 +00:00
|
|
|
#
|
2012-06-01 22:32:43 +00:00
|
|
|
# ---------------------------------------
|
|
|
|
|
# Makefile for the LUFA library itself.
|
|
|
|
|
# ---------------------------------------
|
2010-05-08 03:12:14 +00:00
|
|
|
|
2012-06-02 21:45:51 +00:00
|
|
|
LUFA_VERSION_NUM := $(shell grep LUFA_VERSION_STRING Version.h | cut -d'"' -f2)
|
2013-01-03 10:40:35 +00:00
|
|
|
EXCLUDE_FROM_EXPORT := Documentation DoxygenPages CodeTemplates Build StudioIntegration *.conf *.tar *.o *.d *.lss *.lst *.hex *.elf *.hex *.eep *.map *.bin
|
2012-06-02 21:45:51 +00:00
|
|
|
|
2012-08-18 12:07:05 +00:00
|
|
|
# Default target - no default action when attempting to build the core directly
|
2012-06-02 15:50:10 +00:00
|
|
|
all:
|
|
|
|
|
|
2012-08-18 12:07:05 +00:00
|
|
|
# Export the library core as a TAR archive for importing into an IDE
|
2012-06-01 22:32:43 +00:00
|
|
|
export_tar:
|
2012-04-07 16:40:20 +00:00
|
|
|
@echo Exporting LUFA library to a TAR archive...
|
2012-04-09 10:04:40 +00:00
|
|
|
@tar -cf LUFA_$(LUFA_VERSION_NUM).tar --directory=. $(EXCLUDE_FROM_EXPORT:%=--exclude=%) *
|
2012-04-08 14:22:47 +00:00
|
|
|
@tar -cf LUFA_$(LUFA_VERSION_NUM)_Code_Templates.tar CodeTemplates
|
|
|
|
|
@echo Export LUFA_$(LUFA_VERSION_NUM).tar complete.
|
2011-06-20 14:38:21 +00:00
|
|
|
|
2012-08-18 12:07:05 +00:00
|
|
|
# Display the LUFA version of this library copy
|
2012-06-01 22:32:43 +00:00
|
|
|
version:
|
2012-04-08 14:22:47 +00:00
|
|
|
@echo "LUFA $(LUFA_VERSION_NUM)"
|
2010-07-19 14:00:44 +00:00
|
|
|
|
2012-06-01 22:32:43 +00:00
|
|
|
# Check if this is being included from a legacy or non LUFA build system makefile
|
|
|
|
|
ifneq ($(LUFA_PATH),)
|
2012-07-05 18:32:50 +00:00
|
|
|
LUFA_ROOT_PATH = $(patsubst %/,%,$(LUFA_PATH))/LUFA/
|
2013-01-03 10:40:35 +00:00
|
|
|
|
2012-08-27 18:53:58 +00:00
|
|
|
include $(patsubst %/,%,$(LUFA_PATH))/LUFA/Build/lufa_sources.mk
|
2012-06-01 22:32:43 +00:00
|
|
|
else
|
2012-06-11 18:58:14 +00:00
|
|
|
LUFA_BUILD_MODULES += MASTER
|
|
|
|
|
LUFA_BUILD_TARGETS += export_tar version
|
|
|
|
|
|
2012-06-10 18:35:57 +00:00
|
|
|
LUFA_PATH = .
|
|
|
|
|
ARCH = {AVR8,UC3,XMEGA}
|
|
|
|
|
DOXYGEN_OVERRIDE_PARAMS = QUIET=YES PROJECT_NUMBER=$(LUFA_VERSION_NUM)
|
2013-01-03 10:40:35 +00:00
|
|
|
|
2012-08-18 12:07:05 +00:00
|
|
|
# Remove all object and associated files from the LUFA library core
|
2012-06-01 22:32:43 +00:00
|
|
|
clean:
|
|
|
|
|
rm -f $(LUFA_SRC_ALL_FILES:%.c=%.o)
|
2012-06-10 18:40:39 +00:00
|
|
|
rm -f $(LUFA_SRC_ALL_FILES:%.c=%.d)
|
2012-06-01 22:32:43 +00:00
|
|
|
rm -f $(LUFA_SRC_ALL_FILES:%.c=%.lst)
|
|
|
|
|
|
2012-07-14 13:24:59 +00:00
|
|
|
include Build/lufa_core.mk
|
|
|
|
|
include Build/lufa_sources.mk
|
|
|
|
|
include Build/lufa_doxygen.mk
|
2010-10-13 14:05:35 +00:00
|
|
|
endif
|
2012-06-18 20:36:51 +00:00
|
|
|
|
2013-01-10 20:14:38 +00:00
|
|
|
.PHONY: all export_tar version clean
|