Compile base to static library

This commit is contained in:
Dane Johnson 2022-01-02 19:01:01 -06:00
parent ae1266ccc9
commit 3e89adce77
3 changed files with 5 additions and 2 deletions

1
.gitignore vendored
View File

@ -1,4 +1,5 @@
*.o
*.a
storybook-cli
src/cli/storybook-cli
src/base/cyoa.cpp

View File

@ -1,7 +1,9 @@
CXXFLAGS = -g
OBJS = cyoa.o storybook.o
all: $(OBJS)
all: libstorybook.a
libstorybook.a: $(OBJS)
ar rcs $@ $^
cyoa.cpp: cyoa.leg
leg -o $@ $^
clean:

View File

@ -2,4 +2,4 @@ CXXFLAGS = -g -L../base/
.PHONY: all clean
all: storybook-cli
storybook-cli: storybook_cli.cpp
$(CXX) $(CXXFLAGS) -o $@ $^ ../base/storybook.o ../base/cyoa.o
$(CXX) $(CXXFLAGS) -o $@ $^ -lstorybook