-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
66 lines (48 loc) · 1.71 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
# Makefile for Pixel Shootout
# If you're running Mac, you can build using Xcode
# If you're running Linux, this Makefile should help you
# On Windows, use the Visual Studio project
# You need to have a compiled version of Orx for your platform in the lib/ folder
ODIR=obj
OUTDIR=Build
OUTPUT=$(OUTDIR)/Pixel\ Shootout
CC=g++
FLAGS=-std=c++11 -c -o $(ODIR)/$(@F)
LD=-I inc/ -L lib/
LIB=-l orx
OBJS=Bullet.o Character.o Enemy.o Entity.o Environment.o Main.o Player.o StandAlone.o Weapon.o Item.o Obtainable.o Powerup.o
_OBJS=$(patsubst %, $(ODIR)/%, $(OBJS))
pixelshootout: copyassets $(_OBJS)
$(CC) $(LD) $(_OBJS) $(LIB) -o $(OUTPUT)
copyassets:
mkdir -p $(OUTDIR) $(ODIR)
find data -name '*.png' -exec cp {} $(OUTDIR) \;
cp -u bin/*.ini $(OUTDIR)
$(ODIR)/Bullet.o:
$(CC) $(FLAGS) $(LD) Pixel\ Shootout/Combat/Bullet.cpp
$(ODIR)/Character.o:
$(CC) $(FLAGS) $(LD) Pixel\ Shootout/Entities/Character.cpp
$(ODIR)/Enemy.o:
$(CC) $(FLAGS) $(LD) Pixel\ Shootout/Entities/Enemy.cpp
$(ODIR)/Entity.o:
$(CC) $(FLAGS) $(LD) Pixel\ Shootout/Entities/Entity.cpp
$(ODIR)/Environment.o:
$(CC) $(FLAGS) $(LD) Pixel\ Shootout/App/Environment.cpp
$(ODIR)/Main.o:
$(CC) $(FLAGS) $(LD) Pixel\ Shootout/App/Main.cpp
$(ODIR)/Player.o:
$(CC) $(FLAGS) $(LD) Pixel\ Shootout/Entities/Player.cpp
$(ODIR)/StandAlone.o:
$(CC) $(FLAGS) $(LD) Pixel\ Shootout/App/StandAlone.cpp
$(ODIR)/Weapon.o:
$(CC) $(FLAGS) $(LD) Pixel\ Shootout/Combat/Weapon.cpp
$(ODIR)/Item.o:
$(CC) $(FLAGS) $(LD) Pixel\ Shootout/Items/Item.cpp
$(ODIR)/Obtainable.o:
$(CC) $(FLAGS) $(LD) Pixel\ Shootout/Items/Obtainable.cpp
$(ODIR)/Powerup.o:
$(CC) $(FLAGS) $(LD) Pixel\ Shootout/Items/Powerup.cpp
clean:
rm -f $(OUTPUT) $(ODIR)/*.o
squeakyclean:
rm -rf $(OUTPUT) $(ODIR)