File: Makefile

package info (click to toggle)
alienblaster 1.1.0-10
  • links: PTS
  • area: main
  • in suites: buster, sid
  • size: 12,388 kB
  • sloc: cpp: 9,843; makefile: 60; sh: 9
file content (69 lines) | stat: -rw-r--r-- 1,615 bytes parent folder | download | duplicates (3)
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
# game name
GAME_NAME=alienblaster

# the compiler to use
COMPILER=g++

# include path
INCLUDE_PATH=-I.

#OPTIMIZATION=-g -pg -fprofile-arcs
#OPTIMIZATION=-O3
OPTIMIZATION=-g -O2
#OPTIMIZATION=

# SDL library
SDL_LIBS=$(shell sdl-config --libs)
SDL_FLAGS=$(shell sdl-config --cflags)

# game flags
GAME_FLAGS=-D_GNU_SOURCE -Wall -Winline -finline-functions $(SDL_FLAGS) $(OPTIMIZATION)
GAME_FLAGS+=`dpkg-buildflags --get CFLAGS`
GAME_FLAGS+=`dpkg-buildflags --get CXXFLAGS`
GAME_LIBS=-lSDL_mixer $(SDL_LIBS) $(OPTIMIZATION)
GAME_LIBS+=`dpkg-buildflags --get LDFLAGS`

# all objectfiles
OBJECT_FILES=main.o surfaceDB.o soundDB.o options.o geometry.o video.o game.o \
	racer.o racers.o shots.o shot.o boundingBox.o items.o item.o font.o \
	explosion.o explosions.o mixer.o enemys.o enemy.o wrecks.o wreck.o \
	settings.o intro.o setDifficulty.o global.o formation.o infoscreen.o \
	menuArcadeMode.o sonic.o banners.o banner.o smokePuff.o smokePuffs.o \
	shieldGlow.o background.o input.o

.PHONY: all game clean realclean rebuild tgz

all: depend $(GAME_NAME)

clean:
	rm -f *.o *.da

realclean:
	rm -f *.o *.da *~ Makefile.dep

rebuild: realclean game

.SUFFIXES: .cc

# How to compile a c++ programm
$(GAME_NAME): $(OBJECT_FILES)
	@echo ""
	@echo ""
	@echo "Linking $@"
	@$(COMPILER) -o $(GAME_NAME) $(OBJECT_FILES) $(GAME_LIBS)
	mv $(GAME_NAME) ../

%.o: %.cc
	@echo ""
	@echo ""
	@echo "Compiling $<"
	@$(COMPILER) $(GAME_FLAGS) $(INCLUDE_PATH) -c $< -o $@ 

depend:  dep

dep:
	-touch Makefile.dep
	-makedepend $(INCLUDE_PATH) -Y -f Makefile.dep *.cc 2> /dev/null
	-rm -f Makefile.dep.bak

-include Makefile.dep