diff options
author | Bobby Bingham <koorogi@koorogi.info> | 2015-09-09 19:51:36 -0500 |
---|---|---|
committer | Bobby Bingham <koorogi@koorogi.info> | 2015-09-15 22:43:32 -0500 |
commit | 8abdbbff5f43a6c81d9aae1e71bd340b14e847e1 (patch) | |
tree | 94a6c9377428ad754336d63c02ae886acb8b42a6 /Makefile | |
parent | e6b5c8182d60ce160b4c4d7e706afaa6b30f5645 (diff) |
add variables for configuring saturn toolchain to use
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 13 |
1 files changed, 9 insertions, 4 deletions
@@ -1,5 +1,10 @@ -CFLAGS = -Os -pipe -std=c99 -D_POSIX_C_SOURCE=200809L -LDFLAGS = +CFLAGS = -Os -pipe -std=c99 -D_POSIX_C_SOURCE=200809L +LDFLAGS = +SATURN_CROSS = saturn- +SATURN_CC = $(SATURN_CROSS)gcc -m2 -mb +SATURN_OBJCOPY = $(SATURN_CROSS)objcopy +SATURN_CFLAGS = -Os -pipe -std=c99 -nostdlib +SATURN_LDFLAGS = BOOTSRCS = $(sort $(wildcard boot/*.c)) BOOTELFS = $(patsubst %.c,%.elf,$(BOOTSRCS)) @@ -23,10 +28,10 @@ bin/%: src/%.o $(CC) $(LDFLAGS) $^ -o $@ share/%.boot: boot/%.elf - saturn-objcopy -O binary $< $@ + $(SATURN_OBJCOPY) -O binary $< $@ %.elf: %.c boot/ldscript - saturn-gcc -nostdlib -T boot/ldscript $(CFLAGS) $< -o $@ + $(SATURN_CC) $(SATURN_CFLAGS) $(SATURN_LDFLAGS) -T boot/ldscript $< -o $@ %.c: %.bin tools/bin2c $< > $@ |