You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

27 lines
495 B
Makefile

12 months ago
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 $@ $^