aboutsummaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorClyne Sullivan <clyne@bitgloo.com>2025-01-27 14:21:30 -0500
committerClyne Sullivan <clyne@bitgloo.com>2025-01-27 14:21:30 -0500
commit9592fbf2684b1f3f1892bf02404e41f209b0c5ac (patch)
treebb398714808f65c0ba63e428e09cf54b4864dac3 /Makefile
parentbe2b73fa7b0da33d96200c4f51b8c3f5f76130c3 (diff)
reorganize arch's
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile23
1 files changed, 15 insertions, 8 deletions
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