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.
28 lines
595 B
Makefile
28 lines
595 B
Makefile
SRC := $(wildcard source/*.cpp)
|
|
OBJ := $(subst .cpp,.o,$(SRC))
|
|
|
|
CXXFLAGS += -std=c++20 -ggdb -g3 -O0 \
|
|
-Wall -Wextra -pedantic \
|
|
-Isource
|
|
|
|
all: sprit
|
|
|
|
msp430: CXX := msp430-elf-g++
|
|
msp430: AR := msp430-elf-ar
|
|
msp430: CXXFLAGS += -mmcu=msp430fr2476 -Os -flto -ffunction-sections -fdata-sections
|
|
msp430: CXXFLAGS += -L/usr/msp430-elf/usr/include
|
|
msp430: LDFLAGS += -Tmsp430fr2476.ld -Wl,-gc-sections
|
|
msp430: source/libsprit.a
|
|
|
|
x86: CXXFLAGS += -m32
|
|
x86: sprit
|
|
|
|
clean:
|
|
rm -f sprit source/libsprit.a $(OBJ)
|
|
|
|
sprit: source/libsprit.a
|
|
|
|
source/libsprit.a: $(OBJ)
|
|
$(AR) rc $@ $^
|
|
|