forked from Atlantis-PBEM/Atlantis
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
129 lines (90 loc) · 2.73 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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
# This is the makefile for Atlantis 5.0
#
# Copyright 1998 by Geoff Dunbar
# MODIFICATIONS
# Date Person Comments
# ---- ------ --------
# 2000/MAR/14 Davis Kulis Added the template code.
# 2004/MAR/29 Jan Rietema Added/modified the gamesets
GAME ?= standard
CPLUS = g++
CC = gcc
CFLAGS = -g -I. -I.. -Wall -std=c++11
RULESET_OBJECTS = extra.o map.o monsters.o rules.o world.o
ENGINE_OBJECTS = alist.o aregion.o army.o astring.o battle.o economy.o \
edit.o faction.o fileio.o game.o gamedata.o gamedefs.o gameio.o \
genrules.o i_rand.o items.o main.o market.o modify.o monthorders.o \
npc.o object.o orders.o parseorders.o production.o quests.o runorders.o \
shields.o skills.o skillshows.o specials.o spells.o template.o unit.o \
events.o events-battle.o
OBJECTS = $(patsubst %.o,$(GAME)/obj/%.o,$(RULESET_OBJECTS)) \
$(patsubst %.o,obj/%.o,$(ENGINE_OBJECTS))
$(GAME)-m: objdir $(OBJECTS)
$(CPLUS) $(CFLAGS) -o $(GAME)/$(GAME) $(OBJECTS)
all: basic standard fracas kingdoms havilah neworigins
arcadia: FORCE
$(MAKE) GAME=arcadia
basic: FORCE
$(MAKE) GAME=basic
standard: FORCE
$(MAKE) GAME=standard
kingdoms: FORCE
$(MAKE) GAME=kingdoms
fracas: FORCE
$(MAKE) GAME=fracas
havilah: FORCE
$(MAKE) GAME=havilah
neworigins: FORCE
$(MAKE) GAME=neworigins
$(GAME)/$(GAME): FORCE
$(MAKE) GAME=$(GAME)
all-clean: basic-clean standard-clean fracas-clean kingdoms-clean \
havilah-clean neworigins-clean
arcadia-clean:
$(MAKE) GAME=arcadia clean
basic-clean:
$(MAKE) GAME=basic clean
standard-clean:
$(MAKE) GAME=standard clean
fracas-clean:
$(MAKE) GAME=fracas clean
kingdoms-clean:
$(MAKE) GAME=kingdoms clean
havilah-clean:
$(MAKE) GAME=havilah clean
neworigins-clean:
$(MAKE) GAME=neworigins clean
clean:
rm -f $(OBJECTS)
if [ -d obj ]; then rmdir obj; fi
if [ -d $(GAME)/obj ]; then rmdir $(GAME)/obj; fi
rm -f $(GAME)/html/$(GAME).html
rm -f $(GAME)/$(GAME)
all-rules: basic-rules standard-rules fracas-rules kingdoms-rules \
havilah-rules neworigins-rules
arcadia-rules:
$(MAKE) GAME=arcadia rules
basic-rules:
$(MAKE) GAME=basic rules
standard-rules:
$(MAKE) GAME=standard rules
fracas-rules:
$(MAKE) GAME=fracas rules
kingdoms-rules:
$(MAKE) GAME=kingdoms rules
havilah-rules:
$(MAKE) GAME=havilah rules
neworigins-rules:
$(MAKE) GAME=neworigins rules
rules: $(GAME)/$(GAME)
(cd $(GAME); \
./$(GAME) genrules $(GAME)_intro.html $(GAME).css html/$(GAME).html \
)
FORCE:
objdir:
if [ ! -d obj ]; then mkdir obj; fi
if [ ! -d $(GAME)/obj ]; then mkdir $(GAME)/obj; fi
$(patsubst %.o,$(GAME)/obj/%.o,$(RULESET_OBJECTS)): $(GAME)/obj/%.o: $(GAME)/%.cpp
$(CPLUS) $(CFLAGS) -c -o $@ $<
$(patsubst %.o,obj/%.o,$(ENGINE_OBJECTS)): obj/%.o: %.cpp
$(CPLUS) $(CFLAGS) -c -o $@ $<