File: Makefile.windows

package info (click to toggle)
blobwars 2.00-1
  • links: PTS
  • area: main
  • in suites: buster, stretch
  • size: 77,988 kB
  • sloc: cpp: 19,023; makefile: 130; ansic: 87
file content (107 lines) | stat: -rwxr-xr-x 3,061 bytes parent folder | download
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
PROG = blobwars.exe
PAKNAME = blobwars.pak
DOCS = doc/*
ICONS = icons/
DATA = data gfx sound music

VERSION = 2.00
RELEASE ?= 1
USEPAK ?= 1

PREFIX ?= /usr
BINDIR ?= $(PREFIX)/games/
DATADIR ?= $(PREFIX)/share/games/blobwars/
DOCDIR ?= $(PREFIX)/share/doc/$(PROG)/
ICONDIR ?= $(PREFIX)/share/icons/hicolor/
DESKTOPDIR ?= $(PREFIX)/share/applications/
LOCALEDIR ?= $(PREFIX)/share/locale/
MEDAL_SERVER_HOST = www.parallelrealities.co.uk
MEDAL_SERVER_PORT = 80

CXX = i686-w64-mingw32-g++

CXXFLAGS += -Dmain=SDL_main
CXXFLAGS += -I/your/mingw/include
CXXFLAGS += -DVERSION=$(VERSION) -DRELEASE=$(RELEASE) -DUSEPAK=$(USEPAK)
CXXFLAGS += -DPAKNAME=\"$(PAKNAME)\" -DPAKLOCATION=\".\\\\\" -DGAMEPLAYMANUAL=\"doc/index.html\" -Wall
CXXFLAGS += -DLOCALEDIR=\"\" $(CFLAGS)  -DMEDAL_SERVER_HOST=\"$(MEDAL_SERVER_HOST)\" -DMEDAL_SERVER_PORT=$(MEDAL_SERVER_PORT) -Werror
LIBS = -lmingw32 -lz -lSDL2_mixer -lSDL2_image -lSDL2_ttf -lSDL2_net -lSDL2main -lSDL2 -lwinmm -lgdi32
LDFLAGS = -L/your/mingw/lib

OBJS += CAudio.o
OBJS += CBoss.o
OBJS += CCollision.o CCutscene.o  CConfig.o
OBJS += CData.o 
OBJS += CEffect.o CEngine.o CEntity.o 
OBJS += CFileData.o 
OBJS += CGame.o CGameData.o CGameObject.o CGraphics.o
OBJS += CHub.o 
OBJS += CKeyboard.o 
OBJS += CJoystick.o 
OBJS += CLineDef.o
OBJS += CList.o
OBJS += CMap.o CMath.o CMedalServer.o
OBJS += CObjective.o
OBJS += CPak.o CParticle.o CPersistant.o CPersistData.o
OBJS += CRadarBlip.o CReplayData.o
OBJS += CSpawnPoint.o CSprite.o CSwitch.o
OBJS += CTeleporter.o CTrain.o CTrap.o
OBJS += CWeapon.o CWidget.o

OBJS += aquaBoss.o
OBJS += bosses.o bullets.o 
OBJS += cutscene.o
OBJS += droidBoss.o 
OBJS += effects.o enemies.o entities.o explosions.o 
OBJS += finalBattle.o 
OBJS += galdov.o game.o graphics.o 
OBJS += hub.o 
OBJS += info.o init.o intro.o items.o 
OBJS += lineDefs.o loadSave.o
OBJS += map.o mapData.o mias.o mission.o
OBJS += objectives.o obstacles.o options.o
OBJS += particles.o player.o 
OBJS += resources.o 
OBJS += spawnPoints.o switches.o 
OBJS += tankBoss.o teleporters.o title.o trains.o traps.o triggers.o 
OBJS += weapons.o widgets.o

GAMEOBJS = $(OBJS) main.o
MAPOBJS = $(OBJS) mapEditor.o
PAKOBJS = CFileData.o pak.o

LOCALE_MO = $(patsubst %.po,%.mo,$(wildcard locale/*.po))

ALL = $(PROG) $(LOCALE_MO)
ifeq ($(USEPAK), 1)
	ALL += $(PAKNAME)
endif

# top-level rule to create the program.
all: $(PROG) $(LOCALE_MO)

# compiling other source files.
%.o: src/%.cpp src/%.h src/defs.h src/defines.h src/headers.h
	$(CXX) $(CXXFLAGS) -c $<

# linking the program.
$(PROG): $(GAMEOBJS)
	$(CXX) $(LDFLAGS) $(GAMEOBJS) -o $(PROG) $(LIBS) -mwindows -static-libgcc

pak.exe: $(PAKOBJS)
	$(CXX) $(LDFLAGS) $(PAKOBJS) -o pak.exe $(LIBS)

%.mo: %.po
	msgfmt -c -o $@ $<

mapeditor.exe: $(MAPOBJS)
	$(CXX) $(LDFLAGS) $(MAPOBJS) -o mapeditor.exe $(LIBS) -mwindows

# cleaning everything that can be automatically recreated with "make".
clean:
	$(RM) $(GAMEOBJS) mapEditor.o pak.o $(PROG) $(PAKNAME) pak.exe mapeditor.exe $(LOCALE_MO)

$(PAKNAME): pak.exe
	./pak $(DATA) $(PAKNAME)

buildpak: $(PAKNAME)