forked from Atlantis-PBEM/Atlantis
-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathMakefile
50 lines (35 loc) · 1.17 KB
/
Makefile
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
.PHONY: all clean lib
CFLAGS := -g -I. -I.. -Wall -MP -MMD -O
CXXFLAGS := $(CFLAGS) -std=c++11
CXXBUILD = $(CXX) $(CXXFLAGS) -MF $(patsubst %.cpp,dep/%.d,$<) -c -o $@ $<
# objects shared by all rule sets
OBJ := alist.o aregion.o army.o astring.o battle.o faction.o \
fileio.o game.o gamedefs.o gameio.o genrules.o items.o main.o \
market.o modify.o monthorders.o npc.o object.o orders.o parseorders.o \
production.o runorders.o shields.o skills.o skillshows.o specials.o \
spells.o template.o unit.o events.o
ALL_OBJ := $(OBJ) rand.o
# objects per rule set
RULESET := extra.o monsters.o rules.o world.o gamedata.o
# sub games
GAMES := ceran conquest miskatonic realms standard wyreth
DEP := $(addprefix dep/,$(OBJ:.o=.d))
OBJS := $(addprefix obj/,$(OBJ))
ALL_OBJS := $(addprefix obj/,$(ALL_OBJ))
### targets
all: dep obj
obj:
@mkdir $@
dep:
@mkdir $@
-include $(DEP)
-include $(addsuffix /Makefile.inc, $(GAMES))
clean::
@rm -f $(ALL_OBJS)
$(OBJS): obj/%.o: %.cpp
@$(CXXBUILD)
obj/rand.o: i_rand.c
@$(CC) $(CFLAGS) -MF $(patsubst %.c,dep/%.d,$<) -c -o $@ $<
.PHONY: tags
tags:
ctags --c++-kinds=+p --fields=+iaS --extra=+q --language-force=C++ *.h *.cpp miskatonic/*.cpp