diff options
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 26 |
1 files changed, 26 insertions, 0 deletions
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 $@ $^ + |