Add new "version" makefile target to the main LUFA library makefile, to give an easy...
[pub/lufa.git] / LUFA / makefile
index ff4dbd9..46dcc08 100644 (file)
@@ -12,6 +12,7 @@
 # Check to see if the LUFA_PATH variable has not been set (the makefile is not being included from a project makefile)
 ifeq ($(origin LUFA_PATH), undefined)
    LUFA_ROOT_PATH = .
+   ARCH = {AVR8,UC3}
 else
    LUFA_ROOT_PATH = $(LUFA_PATH)/LUFA
 endif
@@ -57,14 +58,18 @@ LUFA_SRC_SCHEDULER    = $(LUFA_ROOT_PATH)/Scheduler/Scheduler.c
 
 # Check to see if the LUFA_PATH variable has not been set (the makefile is not being included from a project makefile)
 ifeq ($(origin LUFA_PATH), undefined)
-   LUFA_SRC_ALL_FILES = $(LUFA_SRC_USB) $(LUFA_SRC_USBCLASS)       \
-                        $(LUFA_SRC_TEMPERATURE) $(LUFA_SRC_SERIAL) \
-                        $(LUFA_SRC_TWI) $(LUFA_SRC_SCHEDULER)
+   LUFA_SRC_ALL_FILES = $(LUFA_SRC_USB)            \
+                        $(LUFA_SRC_USBCLASS)       \
+                        $(LUFA_SRC_TEMPERATURE)    \
+                        $(LUFA_SRC_SERIAL)         \
+                        $(LUFA_SRC_TWI)            \
+                        $(LUFA_SRC_SCHEDULER)
 
    all:
 
    clean:
        rm -f $(LUFA_SRC_ALL_FILES:%.c=%.o)
+       rm -f $(LUFA_SRC_ALL_FILES:%.c=%.lst)
 
    clean_list:
 
@@ -75,6 +80,9 @@ ifeq ($(origin LUFA_PATH), undefined)
 
    clean_doxygen:
        rm -rf Documentation
+       
+   version:
+       @echo "LUFA `grep LUFA_VERSION_STRING Version.h | cut -d'"' -f2`"
 
-   .PHONY: all clean clean_list doxygen clean_doxygen
+   .PHONY: all clean clean_list doxygen clean_doxygen version
 endif