diff options
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 33 |
1 files changed, 24 insertions, 9 deletions
@@ -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 |