alee-forth/Makefile

33 lines
770 B
Makefile
Raw Normal View History

2023-02-23 18:31:40 -05:00
CXXFLAGS += -std=c++17 -g3 -ggdb -O0 \
2023-02-24 19:09:53 -05:00
-Wall -Wextra -pedantic -Werror \
2023-02-25 19:50:27 -05:00
-fno-exceptions -fno-rtti #-fstack-usage
2023-02-09 10:30:55 -05:00
2023-02-24 08:50:28 -05:00
CXXFILES := corewords.cpp dictionary.cpp parser.cpp state.cpp
2023-02-09 10:30:55 -05:00
OBJFILES := $(subst .cpp,.o,$(CXXFILES))
2023-02-09 16:41:34 -05:00
LIBFILE := libalee.a
2023-02-09 10:30:55 -05:00
2023-02-24 19:09:53 -05:00
all: alee
msp430: CXX := msp430-elf32-g++
msp430: AR := msp430-elf32-ar
msp430: CXXFLAGS += -Os -mmcu=msp430g2553 -ffunction-sections -fdata-sections -DMEMDICTSIZE=200
msp430: LDFLAGS += -L/opt/msp430-elf32/include -Wl,-gc-sections
msp430: alee-msp430
2023-02-09 10:30:55 -05:00
2023-02-09 16:41:34 -05:00
small: CXXFLAGS += -Os
2023-02-24 19:09:53 -05:00
small: alee
2023-02-09 16:41:34 -05:00
2023-02-26 19:31:00 -05:00
fast: CXXFLAGS += -O3 -march=native -mtune=native -flto
2023-02-24 19:09:53 -05:00
fast: alee
alee: $(LIBFILE)
2023-02-24 19:09:53 -05:00
alee-msp430: $(LIBFILE)
2023-02-09 16:41:34 -05:00
$(LIBFILE): $(OBJFILES)
$(AR) cr $@ $(OBJFILES)
2023-02-09 10:30:55 -05:00
clean:
2023-02-24 19:09:53 -05:00
rm -f alee alee-msp430 $(LIBFILE) $(OBJFILES)
2023-02-09 10:30:55 -05:00