Skip to content

Commit

Permalink
Fix missing separator.
Browse files Browse the repository at this point in the history
  • Loading branch information
georgemorgan committed Feb 18, 2018
1 parent 4601d6c commit b5f6add
Showing 1 changed file with 23 additions and 23 deletions.
46 changes: 23 additions & 23 deletions assets/flipper.mk
Expand Up @@ -79,77 +79,77 @@ endif
fvm: $(FVM_TARGET)

echo[%]:
@echo 'Variable "$*" = "$($*)"'
@echo 'Variable "$*" = "$($*)"'

# Flipper build targets
$(FLIPPER_BUILD)/%.c.o: %.c | $(FLIPPER_BUILD_DIRS)
$(FLIPPER_CC) $(ARM_CFLAGS) -MD -MP -MF $(FLIPPER_BUILD)/$*.c.d -c -o $@ $<
$(FLIPPER_CC) $(ARM_CFLAGS) -MD -MP -MF $(FLIPPER_BUILD)/$*.c.d -c -o $@ $<

$(FLIPPER_BUILD)/main.elf: $(FLIPPER_OBJS)
$(FLIPPER_LD) $(FLIPPER_LDFLAGS) -o $@ $^
$(FLIPPER_LD) $(FLIPPER_LDFLAGS) -o $@ $^

$(FLIPPER_BUILD)/cbind.c: $(FLIPPER_BUILD)/main.elf
fdwarf $< $(MODULE) c $(FLIPPER_BUILD)/cbind.c
fdwarf $< $(MODULE) c $(FLIPPER_BUILD)/cbind.c

$(FLIPPER_BUILD)/$(MODULE).elf: $(ASSETS)/ram.ld $(FLIPPER_OBJS) $(FLIPPER_BUILD)/$(FLIPPER_BUILD)/cbind.c.o
$(FLIPPER_LD) $(FLIPPER_LDFLAGS) -o $@ -Wl,-T$^
$(FLIPPER_LD) $(FLIPPER_LDFLAGS) -o $@ -Wl,-T$^

$(FLIPPER_TARGET): $(FLIPPER_BUILD)/$(MODULE).elf
$(FLIPPER_OBJCOPY) --set-section-flags .bss=alloc,load,contents -O binary $< $@
$(FLIPPER_OBJCOPY) --set-section-flags .bss=alloc,load,contents -O binary $< $@

# Keep track of #include dependencies for incremental builds
-include $(FLIPPER_DEPS)

# Host build targets
$(HOST_BUILD)/package_data.c: $(FLIPPER_TARGET) | $(HOST_BUILD_DIRS)
(cd $(<D) && xxd -i $(<F)) > $@
(cd $(<D) && xxd -i $(<F)) > $@

$(HOST_BUILD)/%.c.o: %.c | $(HOST_BUILD_DIRS)
$(HOST_CC) $(HOST_CFLAGS) -MD -MP -MF $(HOST_BUILD)/$*.c.d -c -o $@ $<
$(HOST_CC) $(HOST_CFLAGS) -MD -MP -MF $(HOST_BUILD)/$*.c.d -c -o $@ $<

$(HOST_GLUE_TARGET): $(HOST_GLUE_OBJS)
$(HOST_AR) -rcs $@ $^
$(HOST_AR) -rcs $@ $^

$(HOST_TARGET): $(HOST_BUILD)/$(MODULE).a $(HOST_OBJS)
$(HOST_LD) $(HOST_LDFLAGS) -lflipper -o $@ $^
$(HOST_LD) $(HOST_LDFLAGS) -lflipper -o $@ $^

# Keep track of #include dependencies for incremental builds
-include $(HOST_DEPS)

# FVM build targets
$(FVM_BUILD)/%.c.o: %.c | $(FVM_BUILD_DIRS)
$(FVM_CC) $(FVM_CFLAGS) -MD -MP -MF $(FVM_BUILD)/$*.c.d -c -o $@ $<
$(FVM_CC) $(FVM_CFLAGS) -MD -MP -MF $(FVM_BUILD)/$*.c.d -c -o $@ $<

$(FVM_BUILD)/package_data.c: | $(FVM_BUILD_DIRS)
echo "unsigned char package_bin[] = {\n};\nunsigned package_bin_len = 0;" > $@
echo "unsigned char package_bin[] = {\n};\nunsigned package_bin_len = 0;" > $@

$(FVM_TARGET): $(FVM_OBJS)
$(FVM_LD) $(FVM_LDFLAGS) -shared -lflipper -o $@ $^
$(FVM_LD) $(FVM_LDFLAGS) -shared -lflipper -o $@ $^

# Keep track of #include dependencies for incremental builds
-include $(FVM_DEPS)

# Display the disassembly of the compiled Flipper module
dump: $(FLIPPER_BUILD)/$(MODULE).elf
$(FLIPPER_OBJDUMP) -S -z -D $< | less
$(FLIPPER_OBJDUMP) -S -z -D $< | less

# Upload the compiled module to the connected Flipper device
install: $(FLIPPER_TARGET)
fload $<
fload $<

# Remove built products
clean:
rm -rf $(BUILD)
rm -rf $(BUILD)

# Display usage information
help:
@echo \
"Make subcommands:\n" \
" all (default) - Build the Flipper module ($(FLIPPER_TARGET)) and the host client ($(HOST_TARGET))\n" \
" fvm - Build the Flipper module for the Flipper Virtual Machine ($(FVM_TARGET))\n" \
" dump - Display the assembly code listing of the built Flipper module\n" \
" install - Build the Flipper module and upload it to a connected Flipper device\n" \
" clean - Remove the entire build directory, containing all build products"
@echo \
"Make subcommands:\n" \
" all (default) - Build the Flipper module ($(FLIPPER_TARGET)) and the host client ($(HOST_TARGET))\n" \
" fvm - Build the Flipper module for the Flipper Virtual Machine ($(FVM_TARGET))\n" \
" dump - Display the assembly code listing of the built Flipper module\n" \
" install - Build the Flipper module and upload it to a connected Flipper device\n" \
" clean - Remove the entire build directory, containing all build products"

# Make sure that the .dir files aren't automatically deleted after building.
.SECONDARY:
Expand Down

0 comments on commit b5f6add

Please sign in to comment.