aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorYour Name <you@example.com>2021-05-06 14:13:28 -0400
committerYour Name <you@example.com>2021-05-06 14:13:28 -0400
commit9f3802690f9dd9452e96d1d7a879291978d66e35 (patch)
tree6d6c17b39abdb9490119241bc4fc061744b46d7d /Makefile
parent2a9f262e6db5906db445d465e500d7ba8c90fab3 (diff)
downloaddmtool-9f3802690f9dd9452e96d1d7a879291978d66e35.tar.gz
dmtool-9f3802690f9dd9452e96d1d7a879291978d66e35.tar.bz2
dmtool-9f3802690f9dd9452e96d1d7a879291978d66e35.zip
Refactoring
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile47
1 files changed, 34 insertions, 13 deletions
diff --git a/Makefile b/Makefile
index 4a2dc11..0fd8730 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/dice.cc src/dmtool.cc src/entry.cc src/feature.cc src/item.cc src/rules.cc src/settings.cc src/spellcasting.cc src/spell.cc src/utils.cc src/weapon.cc
+SOURCES=src/armor.cc src/cmd.cc src/cmd_fsops.cc src/cmd_manipulate.cc src/cmd_query.cc src/cmd_usage.cc src/creature.cc src/dice.cc src/dmtool.cc src/entry.cc src/feature.cc src/item.cc src/rules.cc src/settings.cc src/spellcasting.cc src/spell.cc src/utils.cc src/weapon.cc
OBJECTS=$(SOURCES:.cc=.o)
LIBRARY=
EXECUTABLE=dmtool
@@ -28,20 +28,40 @@ $(EXECUTABLE): $(OBJECTS)
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
+ src/jsonable.h src/creature.h src/rules.h src/utils.h
+ $(CC) $(CFLAGS) $< -o $@
+
+src/cmd.o: src/cmd.cc src/cmd.h src/settings.h
+ $(CC) $(CFLAGS) $< -o $@
+
+src/cmd_fsops.o: src/cmd_fsops.cc src/cmd.h src/utils.h src/json.hpp \
+ src/entry.h src/jsonable.h
+ $(CC) $(CFLAGS) $< -o $@
+
+src/cmd_manipulate.o: src/cmd_manipulate.cc src/cmd.h src/utils.h \
+ src/json.hpp src/entry.h src/jsonable.h src/creature.h src/rules.h \
+ src/item.h src/spellcasting.h src/feature.h src/spell.h
+ $(CC) $(CFLAGS) $< -o $@
+
+src/cmd_query.o: src/cmd_query.cc src/cmd.h src/utils.h src/json.hpp \
+ src/entry.h src/jsonable.h src/creature.h src/rules.h src/dice.h \
+ src/weapon.h src/item.h
+ $(CC) $(CFLAGS) $< -o $@
+
+src/cmd_usage.o: src/cmd_usage.cc src/cmd.h
$(CC) $(CFLAGS) $< -o $@
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 src/attack.h
+ src/weapon.h src/item.h src/armor.h src/attack.h src/spellcasting.h \
+ src/spell.h
$(CC) $(CFLAGS) $< -o $@
src/dice.o: src/dice.cc src/dice.h
$(CC) $(CFLAGS) $< -o $@
-src/dmtool.o: src/dmtool.cc src/entry.h src/json.hpp src/jsonable.h \
- src/utils.h src/settings.h src/creature.h src/rules.h src/dice.h \
- src/weapon.h src/item.h
+src/dmtool.o: src/dmtool.cc src/cmd.h src/utils.h src/json.hpp \
+ src/entry.h src/jsonable.h
$(CC) $(CFLAGS) $< -o $@
src/entry.o: src/entry.cc src/entry.h src/json.hpp src/jsonable.h \
@@ -50,35 +70,36 @@ src/entry.o: src/entry.cc src/entry.h src/json.hpp src/jsonable.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/rules.h \
+ src/jsonable.h src/spellcasting.h src/spell.h src/rules.h src/utils.h \
src/attack.h src/weapon.h src/item.h
$(CC) $(CFLAGS) $< -o $@
src/item.o: src/item.cc src/json.hpp src/item.h src/entry.h \
- src/jsonable.h src/utils.h src/weapon.h src/rules.h src/armor.h
+ src/jsonable.h src/weapon.h src/rules.h src/utils.h src/armor.h
$(CC) $(CFLAGS) $< -o $@
src/rules.o: src/rules.cc src/rules.h src/jsonable.h src/json.hpp \
- src/utils.h
+ src/utils.h src/entry.h
$(CC) $(CFLAGS) $< -o $@
src/settings.o: src/settings.cc src/settings.h
$(CC) $(CFLAGS) $< -o $@
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/rules.h src/creature.h
+ src/json.hpp src/entry.h src/jsonable.h src/spell.h src/rules.h \
+ src/utils.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
+src/utils.o: src/utils.cc src/utils.h src/json.hpp src/entry.h \
+ src/jsonable.h src/settings.h
$(CC) $(CFLAGS) $< -o $@
src/weapon.o: src/weapon.cc src/weapon.h src/item.h src/json.hpp \
- src/entry.h src/jsonable.h src/utils.h src/rules.h src/creature.h \
+ src/entry.h src/jsonable.h src/rules.h src/utils.h src/creature.h \
src/dice.h
$(CC) $(CFLAGS) $< -o $@