From 9f3802690f9dd9452e96d1d7a879291978d66e35 Mon Sep 17 00:00:00 2001 From: Your Name Date: Thu, 6 May 2021 14:13:28 -0400 Subject: Refactoring --- Makefile | 47 ++++++++++++++++++++++++++++++++++------------- 1 file changed, 34 insertions(+), 13 deletions(-) (limited to 'Makefile') 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 $@ -- cgit v1.2.3