From 5bc9e4d2add7d2185b2c57a18ebd15b31f5366bd Mon Sep 17 00:00:00 2001 From: Clyne Sullivan Date: Thu, 9 Feb 2023 16:41:34 -0500 Subject: build as library; add small target --- Makefile | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index b34026a..36e299d 100644 --- a/Makefile +++ b/Makefile @@ -1,13 +1,21 @@ -CXXFLAGS += -g3 -ggdb -O0 +CXXFLAGS += -std=c++17 -g3 -ggdb -O0 -CXXFILES := corewords.cpp types.cpp +CXXFILES := corewords.cpp dictionary.cpp executor.cpp parser.cpp state.cpp \ + types.cpp OBJFILES := $(subst .cpp,.o,$(CXXFILES)) +LIBFILE := libalee.a EXEFILE := alee -all: alee +all: $(EXEFILE) -alee: $(OBJFILES) +small: CXXFLAGS += -Os +small: $(EXEFILE) + +$(EXEFILE): $(LIBFILE) + +$(LIBFILE): $(OBJFILES) + $(AR) cr $@ $(OBJFILES) clean: - rm -f alee $(OBJFILES) + rm -f $(EXEFILE) $(LIBFILE) $(OBJFILES) -- cgit v1.2.3