2010-05-08 05:12:14 +02:00
|
|
|
#
|
|
|
|
# LUFA Library
|
2012-05-27 16:42:30 +02:00
|
|
|
# Copyright (C) Dean Camera, 2012.
|
2010-10-13 16:05:35 +02:00
|
|
|
#
|
2010-05-08 05:12:14 +02:00
|
|
|
# dean [at] fourwalledcubicle [dot] com
|
2010-10-28 08:08:58 +02:00
|
|
|
# www.lufa-lib.org
|
2010-05-08 05:12:14 +02:00
|
|
|
#
|
2012-06-02 00:32:43 +02:00
|
|
|
# ---------------------------------------
|
|
|
|
# Makefile for the LUFA library itself.
|
|
|
|
# ---------------------------------------
|
2010-05-08 05:12:14 +02:00
|
|
|
|
2012-06-02 23:45:51 +02:00
|
|
|
LUFA_VERSION_NUM := $(shell grep LUFA_VERSION_STRING Version.h | cut -d'"' -f2)
|
2012-06-06 21:24:22 +02:00
|
|
|
EXCLUDE_FROM_EXPORT := Documentation DoxygenPages CodeTemplates Build *.conf *.tar *.o *.lss *.lst *.hex *.elf *.hex *.eep *.map *.bin *.d
|
2012-06-02 23:45:51 +02:00
|
|
|
|
2012-06-02 00:32:43 +02:00
|
|
|
DOXYGEN_OVERRIDE_PARAMS = PROJECT_NUMBER=$(LUFA_VERSION_NUM)
|
2010-07-19 16:00:44 +02:00
|
|
|
|
2012-06-02 17:50:10 +02:00
|
|
|
all:
|
|
|
|
|
2012-06-02 00:32:43 +02:00
|
|
|
export_tar:
|
2012-04-07 18:40:20 +02:00
|
|
|
@echo Exporting LUFA library to a TAR archive...
|
2012-04-09 12:04:40 +02:00
|
|
|
@tar -cf LUFA_$(LUFA_VERSION_NUM).tar --directory=. $(EXCLUDE_FROM_EXPORT:%=--exclude=%) *
|
2012-04-08 16:22:47 +02:00
|
|
|
@tar -cf LUFA_$(LUFA_VERSION_NUM)_Code_Templates.tar CodeTemplates
|
|
|
|
@echo Export LUFA_$(LUFA_VERSION_NUM).tar complete.
|
2011-06-20 16:38:21 +02:00
|
|
|
|
2012-06-02 00:32:43 +02:00
|
|
|
version:
|
2012-04-08 16:22:47 +02:00
|
|
|
@echo "LUFA $(LUFA_VERSION_NUM)"
|
2010-07-19 16:00:44 +02:00
|
|
|
|
2012-06-02 00:32:43 +02:00
|
|
|
# Check if this is being included from a legacy or non LUFA build system makefile
|
|
|
|
ifneq ($(LUFA_PATH),)
|
|
|
|
LUFA_ROOT_PATH = $(LUFA_PATH)/LUFA/
|
|
|
|
include $(LUFA_PATH)/LUFA/Build/lufa.sources.in
|
|
|
|
else
|
2012-06-02 16:10:02 +02:00
|
|
|
LUFA_BUILD_MODULES += LIBCORE
|
|
|
|
LUFA_BUILD_TARGETS += export_tar version
|
|
|
|
|
|
|
|
LUFA_PATH = .
|
|
|
|
ARCH = {AVR8,UC3,XMEGA}
|
2012-06-02 00:32:43 +02:00
|
|
|
|
|
|
|
clean:
|
|
|
|
rm -f $(LUFA_SRC_ALL_FILES:%.c=%.o)
|
2012-06-02 21:56:50 +02:00
|
|
|
rm -f $(LUFA_SRC_ALL_FILES:%.c=%.o.d)
|
2012-06-02 00:32:43 +02:00
|
|
|
rm -f $(LUFA_SRC_ALL_FILES:%.c=%.lst)
|
|
|
|
|
|
|
|
# Include LUFA build script makefiles
|
2012-06-02 16:10:02 +02:00
|
|
|
include Build/lufa.core.in
|
2012-06-02 00:32:43 +02:00
|
|
|
include Build/lufa.sources.in
|
|
|
|
include Build/lufa.doxygen.in
|
2010-10-13 16:05:35 +02:00
|
|
|
endif
|