From 092002a49f6a4a59200eb674cfad6657890d6ce3 Mon Sep 17 00:00:00 2001 From: Clyne Sullivan Date: Fri, 24 Nov 2023 16:23:40 -0500 Subject: initial upload --- Makefile | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 Makefile (limited to 'Makefile') diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..677edec --- /dev/null +++ b/Makefile @@ -0,0 +1,26 @@ +SRC := $(wildcard source/*.cpp) +OBJ := $(subst .cpp,.o,$(SRC)) + +CXXFLAGS += -std=c++20 -ggdb -g3 -Os \ + -Wall -Wextra -pedantic \ + -Isource + +all: sprit + +msp430: CXX := msp430-elf-g++ +msp430: AR := msp430-elf-ar +msp430: CXXFLAGS += -mmcu=msp430fr2476 -Os #-flto +msp430: LDFLAGS += -L/usr/msp430-elf/usr/include +msp430: sprit + +x86: CXXFLAGS += -m32 +x86: sprit + +clean: + rm -f sprit source/libsprit.a $(OBJ) + +sprit: source/libsprit.a + +source/libsprit.a: $(OBJ) + $(AR) rcu $@ $^ + -- cgit v1.2.3