Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
L
lufa
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Erik Strand
lufa
Commits
bf5b49ec
Commit
bf5b49ec
authored
13 years ago
by
Dean Camera
Browse files
Options
Downloads
Patches
Plain Diff
Add ability to archive build object files into a .a library file to the BUILD build system module.
parent
924edb2f
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
LUFA/Build/lufa.build.in
+14
-5
14 additions, 5 deletions
LUFA/Build/lufa.build.in
LUFA/DoxygenPages/BuildSystem.txt
+4
-0
4 additions, 0 deletions
LUFA/DoxygenPages/BuildSystem.txt
with
18 additions
and
5 deletions
LUFA/Build/lufa.build.in
+
14
−
5
View file @
bf5b49ec
...
@@ -7,7 +7,7 @@
...
@@ -7,7 +7,7 @@
#
#
LUFA_BUILD_MODULES += BUILD
LUFA_BUILD_MODULES += BUILD
LUFA_BUILD_TARGETS += size symbol-sizes all elf hex lss clean
LUFA_BUILD_TARGETS += size symbol-sizes all
lib
elf hex lss clean
LUFA_BUILD_MANDATORY_VARS += TARGET ARCH MCU SRC F_USB LUFA_PATH
LUFA_BUILD_MANDATORY_VARS += TARGET ARCH MCU SRC F_USB LUFA_PATH
LUFA_BUILD_OPTIONAL_VARS += BOARD OPTIMIZATION C_STANDARD CPP_STANDARD F_CPU C_FLAGS CPP_FLAGS ASM_FLAGS CC_FLAGS LD_FLAGS OBJDIR
LUFA_BUILD_OPTIONAL_VARS += BOARD OPTIMIZATION C_STANDARD CPP_STANDARD F_CPU C_FLAGS CPP_FLAGS ASM_FLAGS CC_FLAGS LD_FLAGS OBJDIR
LUFA_BUILD_PROVIDED_VARS +=
LUFA_BUILD_PROVIDED_VARS +=
...
@@ -26,6 +26,7 @@ LUFA_BUILD_PROVIDED_MACROS +=
...
@@ -26,6 +26,7 @@ LUFA_BUILD_PROVIDED_MACROS +=
# symbol-sizes - Print application symbols from the binary ELF
# symbol-sizes - Print application symbols from the binary ELF
# file as a list sorted by size in bytes
# file as a list sorted by size in bytes
# all - Build application and list size
# all - Build application and list size
# lib - Build and archive source files into a library
# elf - Build application ELF debug object file
# elf - Build application ELF debug object file
# hex - Build application HEX object files
# hex - Build application HEX object files
# lss - Build application LSS assembly listing file
# lss - Build application LSS assembly listing file
...
@@ -119,7 +120,8 @@ MSG_COMPILE_CMD := ' [GCC] :'
...
@@ -119,7 +120,8 @@ MSG_COMPILE_CMD := ' [GCC] :'
MSG_ASSEMBLE_CMD := ' [GAS] :'
MSG_ASSEMBLE_CMD := ' [GAS] :'
MSG_NM_CMD := ' [NM] :'
MSG_NM_CMD := ' [NM] :'
MSG_REMOVE_CMD := ' [RM] :'
MSG_REMOVE_CMD := ' [RM] :'
MSG_LINKER_CMD := ' [LNK] :'
MSG_LINK_CMD := ' [LNK] :'
MSG_ARCHIVE_CMD := ' [AR] :'
MSG_SIZE_CMD := ' [SIZE] :'
MSG_SIZE_CMD := ' [SIZE] :'
MSG_OBJCPY_CMD := ' [OBJCPY] :'
MSG_OBJCPY_CMD := ' [OBJCPY] :'
MSG_OBJDMP_CMD := ' [OBJDMP] :'
MSG_OBJDMP_CMD := ' [OBJDMP] :'
...
@@ -215,10 +217,11 @@ clean:
...
@@ -215,10 +217,11 @@ clean:
@echo $(MSG_REMOVE_CMD) Removing dependency files of \"$(TARGET)\"
@echo $(MSG_REMOVE_CMD) Removing dependency files of \"$(TARGET)\"
rm -f $(DEPENDENCY_FILES)
rm -f $(DEPENDENCY_FILES)
@echo $(MSG_REMOVE_CMD) Removing output files of \"$(TARGET)\"
@echo $(MSG_REMOVE_CMD) Removing output files of \"$(TARGET)\"
rm -f $(TARGET).elf $(TARGET).hex $(TARGET).eep $(TARGET).map $(TARGET).lss $(TARGET).sym
rm -f $(TARGET).elf $(TARGET).hex $(TARGET).eep $(TARGET).map $(TARGET).lss $(TARGET).sym
$(TARGET).a
all: build_begin check_source gcc_version elf hex lss sym size build_end
all: build_begin check_source gcc_version elf hex lss sym size build_end
lib: $(TARGET).a
elf: $(TARGET).elf
elf: $(TARGET).elf
hex: $(TARGET).hex $(TARGET).eep
hex: $(TARGET).hex $(TARGET).eep
lss: $(TARGET).lss
lss: $(TARGET).lss
...
@@ -236,10 +239,16 @@ $(OBJDIR)/%.o: %.S $(MAKEFILE_LIST)
...
@@ -236,10 +239,16 @@ $(OBJDIR)/%.o: %.S $(MAKEFILE_LIST)
@echo $(MSG_ASSEMBLE_CMD) Assembling \"$(notdir $<)\"
@echo $(MSG_ASSEMBLE_CMD) Assembling \"$(notdir $<)\"
$(CROSS)-gcc -c $(BASE_CC_FLAGS) $(BASE_ASM_FLAGS) $(CC_FLAGS) $(ASM_FLAGS) $< -o $@
$(CROSS)-gcc -c $(BASE_CC_FLAGS) $(BASE_ASM_FLAGS) $(CC_FLAGS) $(ASM_FLAGS) $< -o $@
.PRECIOUS : $(OBJECT_FILES)
.SECONDARY : %.a
%.a: $(OBJECT_FILES)
@echo $(MSG_ARCHIVE_CMD) Archiving object files into \"$@\"
$(CROSS)-ar rcs $@ $(OBJECT_FILES)
.PRECIOUS : $(OBJECT_FILES)
.PRECIOUS : $(OBJECT_FILES)
.SECONDARY : %.elf
.SECONDARY : %.elf
%.elf: $(OBJECT_FILES)
%.elf: $(OBJECT_FILES)
@echo $(MSG_LINK
ER
_CMD) Linking object files into \"$@\"
@echo $(MSG_LINK_CMD) Linking object files into \"$@\"
$(CROSS)-gcc $(BASE_CC_FLAGS) $(BASE_LD_FLAGS) $(CC_FLAGS) $(LD_FLAGS) $^ -o $@
$(CROSS)-gcc $(BASE_CC_FLAGS) $(BASE_LD_FLAGS) $(CC_FLAGS) $(LD_FLAGS) $^ -o $@
%.hex: %.elf
%.hex: %.elf
...
@@ -262,4 +271,4 @@ $(OBJDIR)/%.o: %.S $(MAKEFILE_LIST)
...
@@ -262,4 +271,4 @@ $(OBJDIR)/%.o: %.S $(MAKEFILE_LIST)
-include $(DEPENDENCY_FILES)
-include $(DEPENDENCY_FILES)
# Phony build targets for this module
# Phony build targets for this module
.PHONY: build_begin build_end gcc_version check_source size symbol-sizes elf hex lss clean
.PHONY: build_begin build_end gcc_version check_source size symbol-sizes
lib
elf hex lss clean
This diff is collapsed.
Click to expand it.
LUFA/DoxygenPages/BuildSystem.txt
+
4
−
0
View file @
bf5b49ec
...
@@ -70,6 +70,10 @@
...
@@ -70,6 +70,10 @@
* <td>Display a size-sorted list of symbols from the compiled application, in decimal bytes.</td>
* <td>Display a size-sorted list of symbols from the compiled application, in decimal bytes.</td>
* </tr>
* </tr>
* <tr>
* <tr>
* <td><tt>lib</tt></td>
* <td>Build and archive all source files into a library A binary file.</td>
* </tr>
* <tr>
* <td><tt>all</tt></td>
* <td><tt>all</tt></td>
* <td>Build and link the application into ELF debug and HEX binary files.</td>
* <td>Build and link the application into ELF debug and HEX binary files.</td>
* </tr>
* </tr>
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment