diff options
author | Your Name <you@example.com> | 2021-05-01 15:10:54 -0400 |
---|---|---|
committer | Your Name <you@example.com> | 2021-05-01 15:10:54 -0400 |
commit | 7b5d1e3d46e94262a9c0fd3a01ab4685aea9d12d (patch) | |
tree | d9b808542216f71dbab053ad23145903e96c6401 /Makefile | |
parent | 5a813a75412ac9b8fadb90c9abd46dd95aee8e9b (diff) | |
download | dmtool-7b5d1e3d46e94262a9c0fd3a01ab4685aea9d12d.tar.gz dmtool-7b5d1e3d46e94262a9c0fd3a01ab4685aea9d12d.tar.bz2 dmtool-7b5d1e3d46e94262a9c0fd3a01ab4685aea9d12d.zip |
Added bash completion, amongst others
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 23 |
1 files changed, 17 insertions, 6 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/spell.cc src/utils.cc src/weapon.cc +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 OBJECTS=$(SOURCES:.cc=.o) LIBRARY= EXECUTABLE=dmtool @@ -21,6 +21,7 @@ install: $(EXECUTABLE) parsed cp -r parsed/* $(DESTDIR)$(PREFIX)/share/dmtool/ install -d $(DESTDIR)$(PREFIX)/bin/ install -m 755 $(EXECUTABLE) $(DESTDIR)$(PREFIX)/bin/ + install -m 644 src/dmtool.bash $(pkg-config --variable=completionsdir bash-completion)/dmtool $(EXECUTABLE): $(OBJECTS) $(CC) $(OBJECTS) -o $@ $(LDFLAGS) @@ -32,11 +33,15 @@ src/armor.o: src/armor.cc src/armor.h src/item.h src/json.hpp src/entry.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 + src/weapon.h src/item.h src/armor.h src/attack.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/utils.h src/settings.h src/creature.h src/rules.h src/dice.h \ + src/weapon.h src/item.h $(CC) $(CFLAGS) $< -o $@ src/entry.o: src/entry.cc src/entry.h src/json.hpp src/jsonable.h \ @@ -45,11 +50,16 @@ 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/utils.h src/spellcasting.h src/spell.h src/rules.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/armor.h + src/jsonable.h src/utils.h src/weapon.h src/rules.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 $(CC) $(CFLAGS) $< -o $@ src/settings.o: src/settings.cc src/settings.h @@ -68,7 +78,8 @@ src/utils.o: src/utils.cc src/utils.h src/json.hpp 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/creature.h src/rules.h + src/entry.h src/jsonable.h src/utils.h src/rules.h src/creature.h \ + src/dice.h $(CC) $(CFLAGS) $< -o $@ clean: |