File: Makefile

package info (click to toggle)
synaesthesia 1.4-3
  • links: PTS
  • area: main
  • in suites: slink
  • size: 252 kB
  • ctags: 301
  • sloc: ansic: 2,098; cpp: 1,387; makefile: 92; sh: 1
file content (58 lines) | stat: -rw-r--r-- 1,710 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

CC=g++ -O6 -ffast-math -funroll-loops -Wall
#CC=g++ -g -pg -O4 -DPROFILE
#CC=g++ -g

#Uncomment these lines to enable X shared memory extensions
# These should give a slightly better frame rate BUT there is a memory leak
# which I haven't been able to find.
#MITSHM=-DMITSHM
#XEXT=-lXext

# Choose installation directory
#INSTALLDIR=/usr/local/bin
INSTALLDIR=/usr/games

title : 
	@echo "Select one of the following:"
	@echo
	@echo "  make svga       - build using svgalib"
	@echo "  make x          - build using X windows"
	@echo "  make sdl        - build using Simple DirectMedia Layer library"
	@echo 
	@echo "To install the resulting binary into" $(INSTALLDIR) "type"
	@echo
	@echo "  make install"
	@echo
	@echo "(edit the make file to change the install directory)"

svga : core.o main.o svga.o sound.o bitmap.o
	$(CC) core.o main.o svga.o sound.o bitmap.o -o synaesthesia -lm -lvga 
x    : core.o main.o xlibwrap.o xlib.o sound.o bitmap.o
	$(CC) core.o main.o xlibwrap.o xlib.o sound.o bitmap.o -o synaesthesia -lm -L /usr/X11R6/lib -lX11 $(XEXT) 
sdl  : core.o main.o sdlwrap.o sound.o bitmap.o
	$(CC) core.o main.o sdlwrap.o sound.o bitmap.o -o synaesthesia -lm -lSDL -ldl

clean :
	rm -f *.o synaesthesia
install :
	install -s synaesthesia $(INSTALLDIR)/synaesthesia

core.o : core.cpp syna.h
	$(CC) -c core.cpp
main.o : main.cpp syna.h
	$(CC) -c main.cpp
sound.o : sound.cpp syna.h
	$(CC) -c sound.cpp
svga.o : svga.cpp syna.h
	$(CC) -c svga.cpp
xlib.o : xlib.c xlib.h
	gcc -O6 -c xlib.c $(MITSHM)
xlibwrap.o : xlibwrap.cpp xlib.h syna.h
	$(CC) -c xlibwrap.cpp $(MITSHM)
sdlwrap.o : sdlwrap.cpp syna.h
	$(CC) -c sdlwrap.cpp
bitmap.o : bitmap.cpp bitmap.h symbol.h syna.h 
	$(CC) -c bitmap.cpp