blob: a83080afcb42ac86fc8da19a4a4500245ad57eef (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
|
CC=g++
LIBS=
CFLAGS=-c -Wall -fPIC -std=c++20
LDFLAGS=
SOURCES=src/creature.cc src/dmtool.cc src/feature.cc src/item.cc src/test.cc src/utils.cc src/weapon.cc
OBJECTS=$(SOURCES:.cc=.o)
LIBRARY=
EXECUTABLE=test
ifeq ($(PREFIX),)
PREFIX := /usr
endif
all: $(SOURCES) $(EXECUTABLE)
$(EXECUTABLE): $(OBJECTS)
$(CC) $(OBJECTS) -o $@ $(LDFLAGS)
src/creature.o: src/creature.cc src/creature.h src/json.hpp \
src/jsonable.h src/utils.h src/settings.h src/dice.h src/rules.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/settings.h src/feature.h
$(CC) $(CFLAGS) $< -o $@
src/feature.o: src/feature.cc src/json.hpp src/feature.h src/jsonable.h \
src/utils.h src/settings.h src/spellcasting.h src/spell.h
$(CC) $(CFLAGS) $< -o $@
src/item.o: src/item.cc src/json.hpp src/item.h src/jsonable.h \
src/utils.h src/settings.h src/weapon.h src/armor.h
$(CC) $(CFLAGS) $< -o $@
src/test.o: src/test.cc src/creature.h src/json.hpp src/jsonable.h \
src/utils.h src/settings.h src/feature.h src/rules.h src/item.h \
src/armor.h src/weapon.h
$(CC) $(CFLAGS) $< -o $@
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/json.hpp src/weapon.h src/item.h \
src/jsonable.h src/utils.h src/settings.h src/creature.h
$(CC) $(CFLAGS) $< -o $@
clean:
rm -f src/*.o $(LIBRARY) $(EXECUTABLE)
|