diff options
author | Clyne Sullivan <clyne@bitgloo.com> | 2023-02-24 19:09:53 -0500 |
---|---|---|
committer | Clyne Sullivan <clyne@bitgloo.com> | 2023-02-24 19:09:53 -0500 |
commit | 0b88b4596e6265863e75e7aabcca52734e147fae (patch) | |
tree | 2210e75d0b5eff6e462770e5278a1baf504423b0 /Makefile | |
parent | 914a75b2097090595d12015b750f97dc55bf7dcd (diff) |
compact implementation; runs on msp430
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 22 |
1 files changed, 15 insertions, 7 deletions
@@ -1,24 +1,32 @@ CXXFLAGS += -std=c++17 -g3 -ggdb -O0 \ - -Wall -Wextra -pedantic -Wno-vla -Werror + -Wall -Wextra -pedantic -Werror \ + -fno-exceptions -fno-rtti #-fstack-usage CXXFILES := corewords.cpp dictionary.cpp parser.cpp state.cpp OBJFILES := $(subst .cpp,.o,$(CXXFILES)) LIBFILE := libalee.a -EXEFILE := alee -all: $(EXEFILE) +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 small: CXXFLAGS += -Os -small: $(EXEFILE) +small: alee fast: CXXFLAGS += -O3 -march=native -mtune=native -fast: $(EXEFILE) +fast: alee + +alee: $(LIBFILE) -$(EXEFILE): $(LIBFILE) +alee-msp430: $(LIBFILE) $(LIBFILE): $(OBJFILES) $(AR) cr $@ $(OBJFILES) clean: - rm -f $(EXEFILE) $(LIBFILE) $(OBJFILES) + rm -f alee alee-msp430 $(LIBFILE) $(OBJFILES) |