From f88ad6651b961781d67e79e282cdf2189bc52f2d Mon Sep 17 00:00:00 2001 From: Clyne Sullivan Date: Mon, 27 Jan 2025 15:51:03 -0500 Subject: msp430 improvements; fix compname bug --- Makefile | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 54338b6..71dce00 100644 --- a/Makefile +++ b/Makefile @@ -5,13 +5,17 @@ all: x86-64 clean: rm -f main foci.o +foci.o: foci.h foci.c + x86-64: CC := gcc -DFOCI_X86_64 -x86-64: x86/main.c foci.o - $(CC) $(CFLAGS) $^ -o main +x86-64: foci.o x86/main.o + $(CC) $(CFLAGS) $(LDFLAGS) $^ -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 +msp430: LDFLAGS += -Lmsp430 +msp430: foci.o msp430/main.o + $(CC) $(CFLAGS) $(LDFLAGS) $^ -o main + -- cgit v1.2.3