<commit_before>LINUX_CC = gcc
ARM_CC = arm-none-eabi-gcc
srcs = $(wildcard src/*.c src/*.s)
objs = $(patsubst %.s, %.o, $(patsubst  %.c, %.o, $(srcs)))
deps = $(filter-out %.s, $(srcs:.c=.d))

main.elf: $(objs)
	$(ARM_CC) -mcpu=cortex-m3 -mlittle-endian -mthumb -DSTM32F10X_CL -Tstm32_flash.ld -Wl,--gc-sections $^ -o $@

%.o: %.c
	$(ARM_CC) -Wpedantic -Wall -mcpu=cortex-m3 -mlittle-endian -mthumb -Iinclude -DSTM32F10X_CL -MMD -c $< -o $@

%.o: %.s
	$(ARM_CC) -Wpedantic -Wall -mcpu=cortex-m3 -mlittle-endian -mthumb -Iinclude -DSTM32F10X_CL -MMD -c $< -o $@

.PHONY: clean

.SUFFIXES:

# $(RM) is rm -f by default
clean:
	$(RM) $(objs) $(deps) main.elf stat_led_test.out

test: stat_led_test.out
	./stat_led_test.out

stat_led_test.out: test/stat_led_test.c test/unity.c src/stat_led.c
	$(LINUX_CC) -Wpedantic -Itest -Iinclude -DSTM32F10X_CL $^ -o $@

-include $(deps)

program: main.elf
	openocd -c "interface jlink" -f stm32f1x.cfg -c"program $< verify reset exit"
<commit_msg>Cleaned up the Makefile a bit<commit_after>LINUX_CC = gcc
ARM_CC = arm-none-eabi-gcc
CC_FLAGS = -Werror -Wpedantic -Wall
ARM_CC_FLAGS = -mcpu=cortex-m3 -mlittle-endian -mthumb
srcs = $(wildcard src/*.c src/*.s)
objs = $(patsubst %.s, %.o, $(patsubst  %.c, %.o, $(srcs)))
deps = $(filter-out %.s, $(srcs:.c=.d))

main.elf: $(objs)
	$(ARM_CC) $(CC_FLAGS) $(ARM_CC_FLAGS) -DSTM32F10X_CL -Tstm32_flash.ld -Wl,--gc-sections $^ -o $@

%.o: %.c
	$(ARM_CC) $(CC_FLAGS) $(ARM_CC_FLAGS) -Iinclude -DSTM32F10X_CL -MMD -c $< -o $@

%.o: %.s
	$(ARM_CC) $(CC_FLAGS) $(ARM_CC_FLAGS) -Iinclude -DSTM32F10X_CL -MMD -c $< -o $@

.PHONY: clean

.SUFFIXES:

# $(RM) is rm -f by default
clean:
	$(RM) $(objs) $(deps) main.elf stat_led_test.out

test: stat_led_test.out
	./stat_led_test.out

stat_led_test.out: test/stat_led_test.c test/unity.c src/stat_led.c
	$(LINUX_CC) $(CC_FLAGS) -Itest -Iinclude -DSTM32F10X_CL $^ -o $@

-include $(deps)

program: main.elf
	openocd -c "interface jlink" -f stm32f1x.cfg -c"program $< verify reset exit"

{'fraction_non_alphanumeric': 0.1983016983016983, 'fraction_numerical': 0.022977022977022976, 'mean_word_length': 3.690866510538642, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1228303', 'n_tokens_mistral': 990, 'n_tokens_neox': 935, 'n_words': 202}