diff options
author | Josh Rahm <joshuarahm@gmail.com> | 2018-01-15 15:07:54 -0700 |
---|---|---|
committer | Josh Rahm <joshuarahm@gmail.com> | 2018-01-15 15:07:54 -0700 |
commit | 79c73cd2734d5e3b3c86885ebcb28aa36a2d0f56 (patch) | |
tree | f2a95625521adb4f3615c3b56e0ce4542f272599 | |
parent | 8e20f53dd3b33058508ff51bd19e49df19b06fb7 (diff) | |
download | stm32l4-79c73cd2734d5e3b3c86885ebcb28aa36a2d0f56.tar.gz stm32l4-79c73cd2734d5e3b3c86885ebcb28aa36a2d0f56.tar.bz2 stm32l4-79c73cd2734d5e3b3c86885ebcb28aa36a2d0f56.zip |
fix bugs in genmake that make it always rerun all dependencies
-rw-r--r-- | system-clock/Makefile.preamble | 4 | ||||
-rwxr-xr-x | system-clock/genmake.pl | 5 |
2 files changed, 4 insertions, 5 deletions
diff --git a/system-clock/Makefile.preamble b/system-clock/Makefile.preamble index 4be2dac..3c8a61b 100644 --- a/system-clock/Makefile.preamble +++ b/system-clock/Makefile.preamble @@ -8,10 +8,10 @@ LD_FLAGS?=-T linker/linker_script.ld -nostdlib --cref -Map linker/main.map -stat all: _$(PREFIX)_obs/main.elf -_$(PREFIX)_obs/main.bin: main.elf +_$(PREFIX)_obs/main.bin: _$(PREFIX)_obs/main.elf $(PREFIX)objcopy -O binary _$(PREFIX)_obs/main.elf _$(PREFIX)_obs/main.bin -flash: main.bin +flash: _$(PREFIX)_obs/main.bin st-flash write _$(PREFIX)_obs/main.bin 0x8000000 clean: diff --git a/system-clock/genmake.pl b/system-clock/genmake.pl index 84387ee..341db3d 100755 --- a/system-clock/genmake.pl +++ b/system-clock/genmake.pl @@ -38,8 +38,7 @@ my $idempotency_cmd_make = print "IDEMPOTENCY_HASH=" . `$idempotency_cmd` . "\n"; my $arch_obs_dir = "_\$(PREFIX)_obs"; -print "$arch_obs_dir:\n\t"; -print "mkdir $arch_obs_dir\n"; +print "CHEAT_PRE_MAKE := \$(shell mkdir -p $arch_obs_dir)\n"; foreach $file (@files) { my $c_file = $file; @@ -54,7 +53,7 @@ foreach $file (@files) { my $deps_as_join = join(" ", @deps); # Emit the rule to make the object file. - print "$obj_file: $arch_obs_dir $deps_as_join\n\t"; + print "$obj_file: $deps_as_join\n\t"; print '$(CC) -c ' . $c_file . ' -o ' . $obj_file . ' $(CFLAGS)' . "\n\n"; # Emit the rule to make the assembly file. |