aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorYour Name <you@example.com>2021-04-29 14:17:08 -0400
committerYour Name <you@example.com>2021-04-29 14:17:08 -0400
commit5a813a75412ac9b8fadb90c9abd46dd95aee8e9b (patch)
tree75c5466d459c793430a6481cd276a624cd843794 /Makefile
parentcd57ad6e208728bafcbc8c7d7b85d88603706978 (diff)
downloaddmtool-5a813a75412ac9b8fadb90c9abd46dd95aee8e9b.tar.gz
dmtool-5a813a75412ac9b8fadb90c9abd46dd95aee8e9b.tar.bz2
dmtool-5a813a75412ac9b8fadb90c9abd46dd95aee8e9b.zip
Removed data files from repo
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile33
1 files changed, 24 insertions, 9 deletions
diff --git a/Makefile b/Makefile
index 8ac1c8c..05bc3b2 100644
--- a/Makefile
+++ b/Makefile
@@ -2,7 +2,7 @@ CC=g++
LIBS=
CFLAGS=-c -Wall -fPIC -std=c++20
LDFLAGS=
-SOURCES=src/armor.cc src/creature.cc src/dmtool.cc src/entry.cc src/feature.cc src/item.cc src/settings.cc src/spellcasting.cc src/utils.cc src/weapon.cc
+SOURCES=src/armor.cc src/creature.cc src/dmtool.cc src/entry.cc src/feature.cc src/item.cc src/settings.cc src/spellcasting.cc src/spell.cc src/utils.cc src/weapon.cc
OBJECTS=$(SOURCES:.cc=.o)
LIBRARY=
EXECUTABLE=dmtool
@@ -12,6 +12,16 @@ endif
all: $(SOURCES) $(EXECUTABLE)
+parsed: parser/scrapeToJson.py parser/utils.py
+ python parser/scrapeToJson.py
+ touch parsed/
+
+install: $(EXECUTABLE) parsed
+ install -d $(DESTDIR)$(PREFIX)/share/dmtool/
+ cp -r parsed/* $(DESTDIR)$(PREFIX)/share/dmtool/
+ install -d $(DESTDIR)$(PREFIX)/bin/
+ install -m 755 $(EXECUTABLE) $(DESTDIR)$(PREFIX)/bin/
+
$(EXECUTABLE): $(OBJECTS)
$(CC) $(OBJECTS) -o $@ $(LDFLAGS)
@@ -20,21 +30,22 @@ src/armor.o: src/armor.cc src/armor.h src/item.h src/json.hpp src/entry.h \
src/jsonable.h src/utils.h src/creature.h src/rules.h
$(CC) $(CFLAGS) $< -o $@
-src/creature.o: src/creature.cc src/creature.h src/json.hpp \
- src/jsonable.h src/utils.h src/rules.h src/dice.h src/feature.h \
- src/entry.h src/weapon.h src/item.h src/armor.h
+src/creature.o: src/creature.cc src/creature.h src/json.hpp src/rules.h \
+ src/jsonable.h src/utils.h src/entry.h src/dice.h src/feature.h \
+ src/weapon.h src/item.h src/armor.h
$(CC) $(CFLAGS) $< -o $@
-src/dmtool.o: src/dmtool.cc src/creature.h src/json.hpp src/jsonable.h \
- src/utils.h src/rules.h src/settings.h
+src/dmtool.o: src/dmtool.cc src/entry.h src/json.hpp src/jsonable.h \
+ src/utils.h src/settings.h
$(CC) $(CFLAGS) $< -o $@
src/entry.o: src/entry.cc src/entry.h src/json.hpp src/jsonable.h \
- src/utils.h
+ src/utils.h src/feature.h src/item.h src/spell.h src/creature.h \
+ src/rules.h
$(CC) $(CFLAGS) $< -o $@
src/feature.o: src/feature.cc src/json.hpp src/feature.h src/entry.h \
- src/jsonable.h src/utils.h src/spellcasting.h src/spell.h
+ src/jsonable.h src/utils.h src/spellcasting.h src/spell.h src/rules.h
$(CC) $(CFLAGS) $< -o $@
src/item.o: src/item.cc src/json.hpp src/item.h src/entry.h \
@@ -46,7 +57,11 @@ src/settings.o: src/settings.cc src/settings.h
src/spellcasting.o: src/spellcasting.cc src/spellcasting.h src/feature.h \
src/json.hpp src/entry.h src/jsonable.h src/utils.h src/spell.h \
- src/creature.h src/rules.h
+ src/rules.h src/creature.h
+ $(CC) $(CFLAGS) $< -o $@
+
+src/spell.o: src/spell.cc src/spell.h src/json.hpp src/entry.h \
+ src/jsonable.h src/utils.h
$(CC) $(CFLAGS) $< -o $@
src/utils.o: src/utils.cc src/utils.h src/json.hpp src/settings.h