From 9592fbf2684b1f3f1892bf02404e41f209b0c5ac Mon Sep 17 00:00:00 2001 From: Clyne Sullivan Date: Mon, 27 Jan 2025 14:21:30 -0500 Subject: reorganize arch's --- Makefile | 23 +++++++++++++++-------- 1 file changed, 15 insertions(+), 8 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 6057c1f..54338b6 100644 --- a/Makefile +++ b/Makefile @@ -1,10 +1,17 @@ -CC := gcc -DFOCI_X86_64 -#CC := arm-none-eabi-gcc -mcpu=cortex-m4 -mthumb -DFOCI_ARM -#CC := msp430-elf-gcc -DFOCI_MSP430 -mmcu=msp430g2553 -CFLAGS := -O3 -ggdb -g3 -Wall -Wextra +CFLAGS := -O3 -ggdb -g3 -Wall -Wextra -I. -all: foci - $(CC) $(CFLAGS) main.c foci.o -o main +all: x86-64 -foci: - $(CC) $(CFLAGS) -c foci.c +clean: + rm -f main foci.o + +x86-64: CC := gcc -DFOCI_X86_64 +x86-64: x86/main.c foci.o + $(CC) $(CFLAGS) $^ -o main + +arm-cm4: CC := arm-none-eabi-gcc -mcpu=cortex-m4 -mthumb -DFOCI_ARM +arm-cm4: foci.o + +msp430: CC := msp430-elf-gcc -DFOCI_MSP430 -mmcu=msp430g2553 +msp430: msp430/main.c foci.o + $(CC) $(CFLAGS) -Lmsp430 $^ -o main -- cgit v1.2.3