- Updated README and image - Added itoa to stdlib - Implemented modulus math for bcc which has none in the stdlib - Updated the build scripts to work on Ubuntu 22 - Added bochsrc with some useful overrides (new bochs bios in ubuntu is broken, use the legacy) - Made most of stdlib compile and run under GNU C for testing - Improved the tokenizer so it will return tokens of more than one character - Moved the basic parser from using void pointers to store values to using basic_value unions to represent possible types - Added tests for the basic tokenizer
21 lines
448 B
Makefile
21 lines
448 B
Makefile
CFLAGS:=-g3 -ffreestanding -fno-builtin -I../src -ansi -Wall -Werror
|
|
|
|
%.o: %.c
|
|
gcc $(CFLAGS) -c -o $@ $<
|
|
for file in $$(cat $$(echo $@ | sed 's/\.o$$//').deps); do \
|
|
gcc $(CFLAGS) -c -o ./$${file}.o ../src/$$file.c ; \
|
|
done
|
|
|
|
%.elf: %.o
|
|
gcc $(CFLAGS) -o $@ $^ $$(cat $$(echo $@ | sed 's/\.elf$$//').deps | sed 's/$$/\.o/g')
|
|
|
|
|
|
all_targets:=$(shell ls *c | sed 's/\.c$$/\.elf/g')
|
|
|
|
all: $(all_targets)
|
|
|
|
.PHONY: clean
|
|
clean:
|
|
rm -f *o
|
|
rm -f *elf
|