Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 47 lines (33 sloc) 1.359 kb
ddefdf7 @smcameron more progress
authored
1
7706abb @smcameron add audio
authored
2 # To compile withaudio, WITHAUDIO=yes,
3 # for no audio support, change to WITHAUDIO=no,
4 WITHAUDIO=yes
5 # WITHAUDIO=no
6
7 ifeq (${WITHAUDIO},yes)
8 SNDLIBS=`pkg-config --libs portaudio-2.0 vorbisfile`
9 SNDFLAGS=-DWITHAUDIOSUPPORT `pkg-config --cflags portaudio-2.0` -DDATADIR=\"./sounds\"
10 OGGOBJ=ogg_to_pcm.o
11 else
12 SNDLIBS=
13 SNDFLAGS=-DWWVIAUDIO_STUBS_ONLY -DDATADIR=\"./sounds\"
14 OGGOBJ=
15 endif
16
17 DEFINES=${SNDFLAGS}
18
ddefdf7 @smcameron more progress
authored
19 all: laser-lander
20
7706abb @smcameron add audio
authored
21 ogg_to_pcm.o: ogg_to_pcm.c ogg_to_pcm.h Makefile
22 $(CC) ${DEBUG} ${PROFILE_FLAG} ${OPTIMIZE_FLAG} `pkg-config --cflags vorbisfile` \
23 -pthread ${WARNFLAG} -c ogg_to_pcm.c
24
25 wwviaudio.o: wwviaudio.c wwviaudio.h ogg_to_pcm.h my_point.h Makefile
26 $(CC) ${WARNFLAG} ${DEBUG} ${PROFILE_FLAG} ${OPTIMIZE_FLAG} \
27 ${DEFINES} \
28 -pthread `pkg-config --cflags vorbisfile` \
29 -c wwviaudio.c
30
eb8058a @smcameron add joystick support
authored
31 joystick.o: joystick.c joystick.h compat.h
32 $(CC) -g -c joystick.c
33
ddefdf7 @smcameron more progress
authored
34 snis_font.o: my_point.h snis_font.c snis_font.h
35 $(CC) -g -c snis_font.c
36
37 snis_typeface.o: snis_typeface.h snis_typeface.c snis_font.h
38 $(CC) -g -c snis_typeface.c
0b18455 @smcameron First light
authored
39
7706abb @smcameron add audio
authored
40 laser-lander: laser-lander.c snis_font.o snis_typeface.o joystick.o wwviaudio.o ogg_to_pcm.o
41 $(CC) -g -L. -o laser-lander laser-lander.c -lopenlase snis_font.o snis_typeface.o joystick.o wwviaudio.o ogg_to_pcm.o ${DEFINES} -pthread `pkg-config --cflags vorbisfile` ${SNDLIBS}
0b18455 @smcameron First light
authored
42
43 clean:
ddefdf7 @smcameron more progress
authored
44 rm -fr laser-lander *.o
0b18455 @smcameron First light
authored
45
46
Something went wrong with that request. Please try again.